SET IDENTITY_INSERT [CMS_Query] ON
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2656, N'update', 0, N'UPDATE COM_Currency SET [CurrencyName] = @CurrencyName, [CurrencyDisplayName] = @CurrencyDisplayName, [CurrencyCode] = @CurrencyCode, [CurrencyRoundTo] = @CurrencyRoundTo, [CurrencyEnabled] = @CurrencyEnabled, [CurrencyFormatString] = @CurrencyFormatString, [CurrencyIsMain] = @CurrencyIsMain, [CurrencyGUID] = @CurrencyGUID, [CurrencyLastModified] = @CurrencyLastModified, [CurrencySiteID] = @CurrencySiteID WHERE [CurrencyID] = @CurrencyID', 0, 1143, 0, '20081229 09:07:00', '7ff6d56c-982b-4e63-82b2-0de047701e2b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (506, N'delete', 0, N'DELETE FROM CMS_WorkflowHistory WHERE [WorkflowHistoryID] = @ID', 0, 298, 0, '20081229 09:07:41', 'c8e56317-90e7-4d66-8e21-75db4b544fe6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (507, N'insert', 0, N'INSERT INTO CMS_WorkflowHistory ([VersionHistoryID], [StepID], [StepDisplayName], [ApprovedByUserID], [ApprovedWhen], [Comment], [WasRejected], [StepName] ) VALUES ( @VersionHistoryID, @StepID, @StepDisplayName, @ApprovedByUserID, @ApprovedWhen, @Comment, @WasRejected, @StepName); SELECT SCOPE_IDENTITY() AS [WorkflowHistoryID]', 1, 298, 0, '20081229 09:07:41', '7bb8b3a8-5c69-45b0-933f-6770d682c097', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (508, N'update', 0, N'UPDATE CMS_WorkflowHistory SET [VersionHistoryID] = @VersionHistoryID, [StepID] = @StepID, [StepDisplayName] = @StepDisplayName, [ApprovedByUserID] = @ApprovedByUserID, [ApprovedWhen] = @ApprovedWhen, [Comment] = @Comment, [WasRejected] = @WasRejected, [StepName] = @StepName WHERE [WorkflowHistoryID] = @WorkflowHistoryID', 0, 298, 0, '20081229 09:07:41', '3d6d3521-bb76-474a-ab53-3c6f9f6d99b0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4676, N'delete', 0, N'DELETE FROM Messaging_Message WHERE [MessageID] = @ID', 0, 1593, 0, '20081229 09:07:12', '7fff1b9d-a233-4203-a9ec-b1185e7c07c9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4677, N'insert', 0, N'INSERT INTO Messaging_Message ([MessageSenderUserID], [MessageSenderNickName], [MessageRecipientUserID], [MessageRecipientNickName], [MessageSent], [MessageSubject], [MessageBody], [MessageRead], [MessageSenderDeleted], [MessageRecipientDeleted], [MessageGUID], [MessageLastModified], [MessageIsRead] ) VALUES ( @MessageSenderUserID, @MessageSenderNickName, @MessageRecipientUserID, @MessageRecipientNickName, @MessageSent, @MessageSubject, @MessageBody, @MessageRead, @MessageSenderDeleted, @MessageRecipientDeleted, @MessageGUID, @MessageLastModified, @MessageIsRead); SELECT SCOPE_IDENTITY() AS [MessageID]', 1, 1593, 0, '20081229 09:07:12', '8886ed74-1306-4058-b11e-8f918f20f82f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4678, N'update', 0, N'UPDATE Messaging_Message SET [MessageSenderUserID] = @MessageSenderUserID, [MessageSenderNickName] = @MessageSenderNickName, [MessageRecipientUserID] = @MessageRecipientUserID, [MessageRecipientNickName] = @MessageRecipientNickName, [MessageSent] = @MessageSent, [MessageSubject] = @MessageSubject, [MessageBody] = @MessageBody, [MessageRead] = @MessageRead, [MessageSenderDeleted] = @MessageSenderDeleted, [MessageRecipientDeleted] = @MessageRecipientDeleted, [MessageGUID] = @MessageGUID, [MessageLastModified] = @MessageLastModified, [MessageIsRead] = @MessageIsRead WHERE [MessageID] = @MessageID', 0, 1593, 0, '20101129 21:06:16', 'feb2dbfb-a61b-4ee7-9055-3d6799edde00', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1301, N'delete', 0, N'DELETE FROM Newsletter_NewsletterIssue WHERE [IssueID] = @ID', 0, 907, 0, '20090910 14:21:30', '7d858909-5839-401e-9ea4-e854ca23c021', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1302, N'insert', 0, N'INSERT INTO Newsletter_NewsletterIssue ([IssueSubject], [IssueText], [IssueUnsubscribed], [IssueNewsletterID], [IssueTemplateID], [IssueSentEmails], [IssueMailoutTime], [IssueShowInNewsletterArchive], [IssueGUID], [IssueLastModified], [IssueSiteID], [IssueOpenedEmails], [IssueBounces] ) VALUES ( @IssueSubject, @IssueText, @IssueUnsubscribed, @IssueNewsletterID, @IssueTemplateID, @IssueSentEmails, @IssueMailoutTime, @IssueShowInNewsletterArchive, @IssueGUID, @IssueLastModified, @IssueSiteID, @IssueOpenedEmails, @IssueBounces); SELECT SCOPE_IDENTITY() AS [IssueID]', 1, 907, 0, '20090910 14:21:30', 'e2973e66-5b19-4266-95e8-881f428d2d19', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1303, N'update', 0, N'UPDATE Newsletter_NewsletterIssue SET [IssueSubject] = @IssueSubject, [IssueText] = @IssueText, [IssueUnsubscribed] = @IssueUnsubscribed, [IssueNewsletterID] = @IssueNewsletterID, [IssueTemplateID] = @IssueTemplateID, [IssueSentEmails] = @IssueSentEmails, [IssueMailoutTime] = @IssueMailoutTime, [IssueShowInNewsletterArchive] = @IssueShowInNewsletterArchive, [IssueGUID] = @IssueGUID, [IssueLastModified] = @IssueLastModified, [IssueSiteID] = @IssueSiteID, [IssueOpenedEmails] = @IssueOpenedEmails, [IssueBounces] = @IssueBounces WHERE [IssueID] = @IssueID', 0, 907, 0, '20090910 14:21:30', 'c7c36933-205f-4a27-816e-cb8f6a451542', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6585, N'insert', 0, N'INSERT INTO CMS_Email ([EmailFrom], [EmailTo], [EmailCc], [EmailBcc], [EmailSubject], [EmailBody], [EmailPlainTextBody], [EmailFormat], [EmailPriority], [EmailSiteID], [EmailLastSendResult], [EmailLastSendAttempt], [EmailGUID], [EmailLastModified], [EmailStatus], [EmailIsMass], [EmailSetName], [EmailSetRelatedID], [EmailReplyTo], [EmailHeaders] ) VALUES ( @EmailFrom, @EmailTo, @EmailCc, @EmailBcc, @EmailSubject, @EmailBody, @EmailPlainTextBody, @EmailFormat, @EmailPriority, @EmailSiteID, @EmailLastSendResult, @EmailLastSendAttempt, @EmailGUID, @EmailLastModified, @EmailStatus, @EmailIsMass, @EmailSetName, @EmailSetRelatedID, @EmailReplyTo, @EmailHeaders); SELECT SCOPE_IDENTITY() AS [EmailID]', 1, 1809, 0, '20090911 10:01:36', '1cba39e2-cb32-4ebc-b089-d6ed0a59ef97', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6586, N'update', 0, N'UPDATE CMS_Email SET [EmailFrom] = @EmailFrom, [EmailTo] = @EmailTo, [EmailCc] = @EmailCc, [EmailBcc] = @EmailBcc, [EmailSubject] = @EmailSubject, [EmailBody] = @EmailBody, [EmailPlainTextBody] = @EmailPlainTextBody, [EmailFormat] = @EmailFormat, [EmailPriority] = @EmailPriority, [EmailSiteID] = @EmailSiteID, [EmailLastSendResult] = @EmailLastSendResult, [EmailLastSendAttempt] = @EmailLastSendAttempt, [EmailGUID] = @EmailGUID, [EmailLastModified] = @EmailLastModified, [EmailStatus] = @EmailStatus, [EmailIsMass] = @EmailIsMass, [EmailSetName] = @EmailSetName, [EmailSetRelatedID] = @EmailSetRelatedID, [EmailReplyTo] = @EmailReplyTo, [EmailHeaders] = @EmailHeaders WHERE [EmailID] = @EmailID', 0, 1809, 0, '20090911 10:01:36', '5c92fb5b-65a6-4da5-a989-c9c038c92c33', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2477, N'delete', 0, N'DELETE FROM Forums_ForumPost WHERE [PostId] = @ID', 0, 1123, 0, '20110113 10:54:46', 'a3d82b24-acdc-40c8-836e-d5a788dde07c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2478, N'insert', 0, N'INSERT INTO Forums_ForumPost ([PostForumID], [PostParentID], [PostIDPath], [PostLevel], [PostSubject], [PostUserID], [PostUserName], [PostUserMail], [PostText], [PostTime], [PostApprovedByUserID], [PostThreadPosts], [PostThreadLastPostUserName], [PostThreadLastPostTime], [PostUserSignature], [PostGUID], [PostLastModified], [PostApproved], [PostIsLocked], [PostIsAnswer], [PostStickOrder], [PostViews], [PostLastEdit], [PostInfo], [PostAttachmentCount], [PostType], [PostThreadPostsAbsolute], [PostThreadLastPostUserNameAbsolute], [PostThreadLastPostTimeAbsolute], [PostQuestionSolved], [PostIsNotAnswer] ) VALUES ( @PostForumID, @PostParentID, @PostIDPath, @PostLevel, @PostSubject, @PostUserID, @PostUserName, @PostUserMail, @PostText, @PostTime, @PostApprovedByUserID, @PostThreadPosts, @PostThreadLastPostUserName, @PostThreadLastPostTime, @PostUserSignature, @PostGUID, @PostLastModified, @PostApproved, @PostIsLocked, @PostIsAnswer, @PostStickOrder, @PostViews, @PostLastEdit, @PostInfo, @PostAttachmentCount, @PostType, @PostThreadPostsAbsolute, @PostThreadLastPostUserNameAbsolute, @PostThreadLastPostTimeAbsolute, @PostQuestionSolved, @PostIsNotAnswer); SELECT SCOPE_IDENTITY() AS [PostId]', 1, 1123, 0, '20110113 10:55:20', '39b5d375-68cd-4c44-9bb9-28f648bbb404', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7149, N'logthreadview', 0, N'UPDATE Forums_ForumPost SET PostViews = CASE WHEN PostViews IS NULL THEN 0 ELSE PostViews END + @ViewCount WHERE PostId = @PostID', 0, 1123, 0, '20110113 10:55:33', '228f7883-a3d0-46eb-8913-bc3497ef3c33', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2544, N'SetPath', 0, N'UPDATE [Forums_ForumPost] SET  [PostIDPath] = @Path WHERE [PostId] = @ID', 0, 1123, 0, '20110113 10:56:40', '29cf6a6f-9b52-4e07-b9cd-e3bfd5e563e8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2479, N'update', 0, N'UPDATE Forums_ForumPost SET [PostForumID] = @PostForumID, [PostParentID] = @PostParentID, [PostIDPath] = @PostIDPath, [PostLevel] = @PostLevel, [PostSubject] = @PostSubject, [PostUserID] = @PostUserID, [PostUserName] = @PostUserName, [PostUserMail] = @PostUserMail, [PostText] = @PostText, [PostTime] = @PostTime, [PostApprovedByUserID] = @PostApprovedByUserID, [PostThreadPosts] = @PostThreadPosts, [PostThreadLastPostUserName] = @PostThreadLastPostUserName, [PostThreadLastPostTime] = @PostThreadLastPostTime, [PostUserSignature] = @PostUserSignature, [PostGUID] = @PostGUID, [PostLastModified] = @PostLastModified, [PostApproved] = @PostApproved, [PostIsLocked] = @PostIsLocked, [PostIsAnswer] = @PostIsAnswer, [PostStickOrder] = @PostStickOrder, [PostViews] = @PostViews, [PostLastEdit] = @PostLastEdit, [PostInfo] = @PostInfo, [PostAttachmentCount] = @PostAttachmentCount, [PostType] = @PostType, [PostThreadPostsAbsolute] = @PostThreadPostsAbsolute, [PostThreadLastPostUserNameAbsolute] = @PostThreadLastPostUserNameAbsolute, [PostThreadLastPostTimeAbsolute] = @PostThreadLastPostTimeAbsolute, [PostQuestionSolved] = @PostQuestionSolved, [PostIsNotAnswer] = @PostIsNotAnswer WHERE [PostId] = @PostID', 0, 1123, 0, '20110113 10:57:10', 'de54b204-beac-4fae-b0e0-64f63f27af1f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4650, N'deleteUnusedSubscriptions', 0, N'DELETE FROM Forums_ForumSubscription WHERE ((SubscriptionPostID IS NOT NULL)AND(SubscriptionPostID NOT IN (SELECT PostId FROM Forums_ForumPost)))OR(SubscriptionForumID NOT IN (SELECT ForumID FROM Forums_Forum))', 0, 1124, 0, '20110113 10:59:11', '6f72d991-61a0-4c6a-80f7-a91797cd67f6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (94, N'delete', 0, N'DELETE FROM CMS_Role WHERE [RoleID] = @ID', 0, 56, 0, '20081229 09:07:22', '0c201d18-7bb1-49cc-b1c5-a6280f421d7e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (54, N'insert', 0, N'INSERT INTO CMS_Role ([RoleDisplayName], [RoleName], [RoleDescription], [SiteID], [RoleGUID], [RoleLastModified], [RoleGroupID], [RoleIsGroupAdministrator], [RoleIsDomain] ) VALUES ( @RoleDisplayName, @RoleName, @RoleDescription, @SiteID, @RoleGUID, @RoleLastModified, @RoleGroupID, @RoleIsGroupAdministrator, @RoleIsDomain); SELECT SCOPE_IDENTITY() AS [RoleID]', 1, 56, 0, '20090318 19:05:17', '39802ab1-b64c-457c-89d3-9ecf6130a7cb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (53, N'update', 0, N'UPDATE CMS_Role SET [RoleDisplayName] = @RoleDisplayName, [RoleName] = @RoleName, [RoleDescription] = @RoleDescription, [SiteID] = @SiteID, [RoleGUID] = @RoleGUID, [RoleLastModified] = @RoleLastModified, [RoleGroupID] = @RoleGroupID, [RoleIsGroupAdministrator] = @RoleIsGroupAdministrator, [RoleIsDomain] = @RoleIsDomain WHERE [RoleID] = @RoleID', 0, 56, 0, '20090318 19:05:21', '58511c29-6292-4fd3-a8af-0dadb1a9eb43', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4649, N'getversionattachmentsnobinary', 0, N'SELECT ##TOPN## AttachmentHistoryID, AttachmentName, AttachmentExtension, AttachmentSize, AttachmentMimeType, AttachmentImageWidth, AttachmentImageHeight, AttachmentDocumentID, AttachmentGUID, AttachmentIsUnsorted, AttachmentOrder, AttachmentGroupGUID, AttachmentHash, AttachmentTitle, AttachmentDescription, AttachmentCustomData FROM CMS_AttachmentHistory WHERE (##WHERE##) AND AttachmentHistoryID IN (SELECT AttachmentHistoryID FROM CMS_VersionAttachment WHERE VersionHistoryID = @VersionHistoryID) ORDER BY ##ORDERBY##', 0, 516, 0, '20110119 10:47:15', 'ea7e6083-f13b-4a9d-87c7-cc91c6c0fc18', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2772, N'RemoveDependencies', 1, N'Proc_COM_Customer_RemoveDependencies', 1, 1157, 0, '20110211 12:33:18', '1a734bc5-8b5f-493a-a79a-ca0a7acc56e0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2977, N'RemoveDependencies', 1, N'Proc_COM_Department_RemoveDependencies', 0, 1148, 0, '20110211 12:33:46', 'e779c1e2-2a90-4a0d-85c3-fcfd3cef00b4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2971, N'RemoveDependencies', 1, N'Proc_COM_DiscountCoupon_RemoveDependencies', 0, 1149, 0, '20110211 12:34:28', '91dc5359-b166-4e07-8e22-bbb9feb0ee29', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4157, N'RemoveDependencies', 1, N'Proc_COM_DiscountLevel_RemoveDependencies', 1, 1429, 0, '20110211 12:34:44', '5a441155-507a-45ef-9d21-1f745d480e8b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2739, N'RemoveDependencies', 1, N'Proc_COM_ExchangeTable_RemoveDependencies', 1, 1151, 0, '20110211 12:35:17', 'e519ed12-07c9-47af-a882-a8be0dbbd70e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4751, N'RemoveDependencies', 1, N'Proc_COM_OptionCategory_RemoveDependencies', 1, 1596, 0, '20110211 12:36:04', '6fda5635-8122-49ea-b635-5f34c81500f6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2953, N'removedependencies', 1, N'Proc_COM_Order_RemoveDependencies', 0, 1158, 0, '20110211 12:36:30', 'b38ca7bc-47de-4825-9367-3a2a074bad07', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3786, N'RemoveDependencies', 1, N'Proc_COM_PaymentOption_RemoveDependencies', 1, 1144, 0, '20110211 12:41:53', '21999392-7bb3-46cc-802e-26190d36ca7f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2972, N'RemoveDependencies', 1, N'Proc_COM_SKU_RemoveDependencies', 1, 1159, 0, '20110211 12:47:17', '21bddeae-5db0-4900-aad2-1dc59d9a55c5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (209, N'getpermissionMatrix', 0, N'IF @type = ''r'' SELECT ##TOPN## Matrix.*, ''Allowed'' = CASE WHEN CMS_RolePermission.RoleID IS NULL THEN 0 ELSE 1 END FROM (SELECT CMS_Permission.PermissionID, CMS_Permission.PermissionDisplayName, CMS_Permission.PermissionName, CMS_Permission.ClassID, CMS_Permission.ResourceID,CMS_Permission.PermissionDescription, CMS_Role.RoleID, CMS_Role.Rolename, CMS_Role.RoleDisplayName FROM CMS_Permission, CMS_Role WHERE (CMS_Permission.PermissionDisplayInMatrix = @DisplayInMatrix OR ((@DisplayInMatrix=1) AND (CMS_Permission.PermissionDisplayInMatrix IS NULL))) AND ResourceID = @ID AND RoleID IN (SELECT RoleID FROM CMS_Role WHERE ##WHERE## AND (@SiteID = 0 OR SiteID = @SiteID)) ) Matrix LEFT JOIN CMS_RolePermission ON (Matrix.PermissionID = CMS_RolePermission.PermissionID AND CMS_RolePermission.RoleID = Matrix.RoleID) ORDER BY Matrix.RoleDisplayName, Matrix.RoleID, Matrix.PermissionDisplayName ELSE SELECT Matrix.*, ''Allowed'' = CASE when CMS_RolePermission.RoleID IS NULL THEN 0 ELSE 1 END FROM (SELECT CMS_Permission.PermissionID, CMS_Permission.PermissionDisplayName, CMS_Permission.PermissionName, CMS_Permission.ClassID, CMS_Permission.ClassID AS ResourceID,CMS_Permission.PermissionDescription, CMS_Role.RoleID, CMS_Role.Rolename, CMS_Role.RoleDisplayName FROM CMS_Permission, CMS_Role WHERE (CMS_Permission.PermissionDisplayInMatrix = @DisplayInMatrix OR ((@DisplayInMatrix=1) AND (CMS_Permission.PermissionDisplayInMatrix IS NULL))) AND ClassID = @ID AND RoleID IN (SELECT RoleID FROM CMS_Role WHERE ##WHERE## AND (@SiteID = 0 OR SiteID = @SiteID)) ) Matrix LEFT JOIN CMS_RolePermission ON (Matrix.PermissionID = CMS_RolePermission.PermissionID AND CMS_RolePermission.RoleID = Matrix.RoleID) ORDER BY Matrix.RoleDisplayName, Matrix.RoleID, Matrix.PermissionDisplayName', 0, 131, 0, '20110211 14:01:04', '7cc4d4d5-7073-4f97-8381-03ae1160f6c6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (9070, N'getPermissionMatrix', 0, N'SELECT ##TOPN## Matrix.##COLUMNS##, CASE WHEN CMS_RoleUIElement.RoleID IS NULL THEN 0 ELSE 1 END AS Allowed, @ElementID AS ElementID, @ElementDisplayName AS ElementDisplayName FROM (SELECT CMS_Role.RoleID, CMS_Role.Rolename, CMS_Role.RoleDisplayName FROM CMS_Role WHERE RoleID IN (SELECT RoleID FROM CMS_Role WHERE ##WHERE## AND ((@SiteID = 0 AND SiteID IS NULL) OR SiteID = @SiteID))) Matrix LEFT JOIN CMS_RoleUIElement ON ( CMS_RoleUIElement.RoleID = Matrix.RoleID AND CMS_RoleUIElement.ElementID = @ElementID) ORDER BY ##ORDERBY##', 0, 2195, 0, '20110211 14:02:08', 'bbb26638-3b08-4441-8c0d-3c5d7e54be03', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6211, N'delete', 0, N'DELETE FROM CMS_BannedIP WHERE [IPAddressID] = @ID', 0, 1740, 0, '20081229 09:07:11', '9a588465-3f57-4db2-ab98-de18c55805cf', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6212, N'insert', 0, N'INSERT INTO CMS_BannedIP ([IPAddress], [IPAddressRegular], [IPAddressAllowed], [IPAddressAllowOverride], [IPAddressBanReason], [IPAddressBanType], [IPAddressBanEnabled], [IPAddressSiteID], [IPAddressGUID], [IPAddressLastModified] ) VALUES ( @IPAddress, @IPAddressRegular, @IPAddressAllowed, @IPAddressAllowOverride, @IPAddressBanReason, @IPAddressBanType, @IPAddressBanEnabled, @IPAddressSiteID, @IPAddressGUID, @IPAddressLastModified); SELECT SCOPE_IDENTITY() AS [IPAddressID]', 1, 1740, 0, '20081229 09:07:11', '6e946631-36a4-42a1-9df4-c7aeea1b4f06', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6213, N'update', 0, N'UPDATE CMS_BannedIP SET [IPAddress] = @IPAddress, [IPAddressRegular] = @IPAddressRegular, [IPAddressAllowed] = @IPAddressAllowed, [IPAddressAllowOverride] = @IPAddressAllowOverride, [IPAddressBanReason] = @IPAddressBanReason, [IPAddressBanType] = @IPAddressBanType, [IPAddressBanEnabled] = @IPAddressBanEnabled, [IPAddressSiteID] = @IPAddressSiteID, [IPAddressGUID] = @IPAddressGUID, [IPAddressLastModified] = @IPAddressLastModified WHERE [IPAddressID] = @IPAddressID', 0, 1740, 0, '20081229 09:07:11', '7693bf20-0e7b-4a8c-883b-bff7f138ea3c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2718, N'delete', 0, N'DELETE FROM COM_ExchangeTable WHERE [ExchangeTableID] = @ID', 0, 1151, 0, '20081229 09:07:00', '0fafbff4-7717-48f5-813f-2ab24164f9ed', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2719, N'insert', 0, N'INSERT INTO COM_ExchangeTable ([ExchangeTableDisplayName], [ExchangeTableValidFrom], [ExchangeTableValidTo], [ExchangeTableGUID], [ExchangeTableLastModified], [ExchangeTableSiteID], [ExchangeTableRateFromGlobalCurrency] ) VALUES ( @ExchangeTableDisplayName, @ExchangeTableValidFrom, @ExchangeTableValidTo, @ExchangeTableGUID, @ExchangeTableLastModified, @ExchangeTableSiteID, @ExchangeTableRateFromGlobalCurrency); SELECT SCOPE_IDENTITY() AS [ExchangeTableID]', 1, 1151, 0, '20081229 09:07:00', 'ad90839d-4ff6-4d4f-9338-fd91a6b4d07c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2720, N'update', 0, N'UPDATE COM_ExchangeTable SET [ExchangeTableDisplayName] = @ExchangeTableDisplayName, [ExchangeTableValidFrom] = @ExchangeTableValidFrom, [ExchangeTableValidTo] = @ExchangeTableValidTo, [ExchangeTableGUID] = @ExchangeTableGUID, [ExchangeTableLastModified] = @ExchangeTableLastModified, [ExchangeTableSiteID] = @ExchangeTableSiteID, [ExchangeTableRateFromGlobalCurrency] = @ExchangeTableRateFromGlobalCurrency WHERE [ExchangeTableID] = @ExchangeTableID', 0, 1151, 0, '20081229 09:07:00', 'f7909c99-87e7-4049-a140-2b4e60a4e228', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (922, N'removedependencies', 1, N'Proc_CMS_Site_RemoveDependencies', 1, 52, 0, '20110228 19:31:07', '780ded66-97fa-410c-b5ac-d22cf12c9e71', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2577, N'removedependencies', 1, N'Proc_Staging_Server_RemoveDependencies', 0, 1132, 0, '20110228 19:36:24', '64fd9b0a-1ff2-48f5-96d0-5aae721fee4b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2578, N'removedependencies', 1, N'Proc_Staging_Task_RemoveDependencies', 0, 1134, 0, '20110228 19:36:44', '8ab25100-0d60-414e-a447-c6317ad5c13a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (729, N'removedependencies', 1, N'Proc_CMS_Workflow_RemoveDependencies', 1, 171, 0, '20110228 20:01:46', 'ba71fb6a-d4e2-43ba-a531-f8aadd2ec29c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1291, N'removedependencies', 1, N'Proc_CMS_WorkflowStep_RemoveDependencies', 1, 172, 0, '20110228 20:02:05', '6e4eb46e-7674-429b-8865-cdb0f36984db', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (559, N'removedependencies', 1, N'Proc_CMS_VersionHistory_RemoveDependencies', 1, 214, 0, '20110228 20:02:36', '471fba09-1869-4400-890b-dc19d0163c1d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5410, N'removedependencies', 1, N'Proc_CMS_RelationshipName_RemoveDependencies', 1, 530, 0, '20110228 20:03:06', '4d044efe-1c53-4e8d-a5d4-0377b1a1f6ad', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5569, N'removedependencies', 1, N'Proc_CMS_Permission_RemoveDependencies', 0, 131, 0, '20110228 20:03:32', '961aca99-6503-4200-9f87-42a139c497a5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2047, N'removedependencies', 1, N'Proc_CMS_Tree_RemoveDependencies', 0, 143, 0, '20110228 20:04:17', 'dfbfa33b-35db-413b-be4a-e8401900670f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3793, N'RemoveDependencies', 1, N'Proc_COM_ShippingOption_RemoveDependencies', 1, 1150, 0, '20110301 08:01:50', '472fbaa6-8382-4cd2-be09-70e613a335a8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2978, N'RemoveDependencies', 1, N'Proc_COM_Currency_RemoveDependencies', 0, 1143, 0, '20110301 09:46:34', '230d2ce7-9e04-4601-aca6-9e2be3fad586', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2048, N'removedependencies', 1, N'Proc_CMS_UICulture_RemoveDependencies', 0, 490, 0, '20110301 10:08:51', '55fc1371-4a3c-4a78-b839-406bbead3e92', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4261, N'removedependencies', 1, N'Proc_EventManager_RemoveDependencies', 1, 1511, 0, '20110301 10:10:23', '749c6279-35b7-4bda-9cc1-e84bf69cbf0b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (353, N'removedependencies', 1, N'Proc_CMS_Culture_RemoveDependencies', 0, 1, 0, '20110301 10:10:38', 'c66b80aa-6526-49ac-8f5b-b127f4025acd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1443, N'removedependencies', 1, N'Proc_Newsletter_Issue_RemoveDependencies', 0, 907, 0, '20110301 10:12:27', '5a5d472b-81ae-40e8-a257-c1e54462a309', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1390, N'removedependencies', 1, N'Proc_Newsletter_Newsletter_RemoveDependencies', 0, 913, 0, '20110301 10:14:26', 'bd88e21e-fbfc-4257-b1fc-fe0410beab22', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3349, N'removedependencies', 1, N'Proc_Polls_Poll_RemoveDependencies', 1, 1330, 0, '20110301 10:15:21', 'f1f915ca-4218-4f6e-90ba-9f256fde9f8c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1379, N'removedependencies', 1, N'Proc_CMS_InlineControl_RemoveDependencies', 1, 877, 0, '20110301 10:28:35', '810fb3de-55b0-4b3a-9aa2-84ee0f91a32a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5224, N'delete', 0, N'DELETE FROM CMS_UserRole WHERE [UserRoleID] = @ID', 0, 109, 0, '20110301 10:42:32', '84537af8-7336-45e1-9b34-14a5711469ff', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5225, N'insert', 0, N'INSERT INTO CMS_UserRole ([UserID], [RoleID], [ValidTo] ) VALUES ( @UserID, @RoleID, @ValidTo); SELECT SCOPE_IDENTITY() AS [UserRoleID]', 1, 109, 0, '20081229 09:07:40', '2506ab18-0a37-4c36-ad70-e6e2e2cf7207', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5226, N'update', 0, N'UPDATE CMS_UserRole SET [UserID] = @UserID, [RoleID] = @RoleID, [ValidTo] = @ValidTo WHERE [UserRoleID] = @UserRoleID', 0, 109, 0, '20081229 09:07:40', 'cbf5eb1d-2923-454b-9e67-2cc722138243', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (903, N'insert', 0, N'INSERT INTO CMS_CssStylesheet ([StylesheetDisplayName], [StylesheetName], [StylesheetText], [StylesheetCheckedOutByUserID], [StylesheetCheckedOutMachineName], [StylesheetCheckedOutFileName], [StylesheetVersionGUID], [StylesheetGUID], [StylesheetLastModified] ) VALUES ( @StylesheetDisplayName, @StylesheetName, @StylesheetText, @StylesheetCheckedOutByUserID, @StylesheetCheckedOutMachineName, @StylesheetCheckedOutFileName, @StylesheetVersionGUID, @StylesheetGUID, @StylesheetLastModified); SELECT SCOPE_IDENTITY() AS [StylesheetID]', 1, 555, 0, '20110301 18:18:34', '36c6a9d6-6798-40c0-a463-365249a43b8f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (900, N'delete', 0, N'DELETE FROM CMS_CssStylesheet WHERE [StylesheetID] = @ID', 0, 555, 0, '20110301 18:19:15', 'c8737e6b-61ab-439a-9b37-08db579aec5a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (902, N'update', 0, N'UPDATE CMS_CssStylesheet SET [StylesheetDisplayName] = @StylesheetDisplayName, [StylesheetName] = @StylesheetName, [StylesheetText] = @StylesheetText, [StylesheetCheckedOutByUserID] = @StylesheetCheckedOutByUserID, [StylesheetCheckedOutMachineName] = @StylesheetCheckedOutMachineName, [StylesheetCheckedOutFileName] = @StylesheetCheckedOutFileName, [StylesheetVersionGUID] = @StylesheetVersionGUID, [StylesheetGUID] = @StylesheetGUID, [StylesheetLastModified] = @StylesheetLastModified WHERE [StylesheetID] = @StylesheetID', 0, 555, 0, '20110301 18:19:33', '01b6118c-c334-48e3-9f02-60ddfc5d3dbc', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2564, N'delete', 0, N'DELETE FROM Staging_SyncLog WHERE [SyncLogID] = @ID', 0, 1133, 0, '20110301 18:29:43', '6dd04661-c924-49e9-9094-d5bcb52f57c7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2565, N'insert', 0, N'INSERT INTO Staging_SyncLog ([SyncLogTaskID], [SyncLogServerID], [SyncLogTime], [SyncLogError] ) VALUES ( @SyncLogTaskID, @SyncLogServerID, @SyncLogTime, @SyncLogError); SELECT SCOPE_IDENTITY() AS [SyncLogID]', 1, 1133, 0, '20110301 18:29:56', '6c16d7ae-d855-44bd-8b1f-03225305f061', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2780, N'removedependencies', 1, N'Proc_COM_OrderStatus_RemoveDependencies', 0, 1146, 0, '20110302 08:23:45', 'ed2c4112-6771-4f1e-a66f-1b6fd647861f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (329, N'removedependencies', 1, N'Proc_CMS_Resource_RemoveDependencies', 0, 134, 0, '20110302 08:32:51', '02af40ba-ce2f-407b-95cf-21a273968b8b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6424, N'removedependencies', 1, N'Proc_CMS_Category_RemoveDependencies', 0, 1721, 0, '20110302 08:36:29', 'd2964963-ef8c-495d-bf3f-a9f8f26f44d6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (683, N'removedependencies', 1, N'Proc_CMS_Layout_RemoveDependencies', 0, 410, 0, '20110307 11:11:04', '3fd22283-3bab-4ed7-a48d-b6083df5c1d3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (904, N'removedependencies', 1, N'Proc_CMS_CSSStyleSheet_RemoveDependencies', 0, 555, 0, '20110307 11:11:22', '3c0ca4c3-7508-45dd-a59c-2aa997656d81', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (960, N'removedependencies', 1, N'Proc_CMS_PageTemplate_RemoveDependencies', 0, 157, 0, '20110307 11:11:35', 'd27e833e-9351-4af9-8f8b-e2a3aac8fd5b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2793, N'RemoveDependencies', 1, N'Proc_COM_TaxClass_RemoveDependencies', 1, 1152, 0, '20110311 19:43:13', 'c3b10cb8-855a-4591-899c-c5962e49f8e2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4310, N'delete', 0, N'DELETE FROM CMS_MetaFile WHERE [MetaFileID] = @ID', 0, 1527, 0, '20081229 09:07:12', 'b4ce9763-db1c-43c7-b5bd-95c8fc60b038', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4311, N'insert', 0, N'INSERT INTO CMS_MetaFile ([MetaFileObjectID], [MetaFileObjectType], [MetaFileGroupName], [MetaFileName], [MetaFileExtension], [MetaFileSize], [MetaFileMimeType], [MetaFileBinary], [MetaFileImageWidth], [MetaFileImageHeight], [MetaFileGUID], [MetaFileLastModified], [MetaFileSiteID], [MetaFileTitle], [MetaFileDescription], [MetaFileCustomData] ) VALUES ( @MetaFileObjectID, @MetaFileObjectType, @MetaFileGroupName, @MetaFileName, @MetaFileExtension, @MetaFileSize, @MetaFileMimeType, @MetaFileBinary, @MetaFileImageWidth, @MetaFileImageHeight, @MetaFileGUID, @MetaFileLastModified, @MetaFileSiteID, @MetaFileTitle, @MetaFileDescription, @MetaFileCustomData); SELECT SCOPE_IDENTITY() AS [MetaFileID]', 1, 1527, 0, '20081229 09:07:12', '0224c4ce-e8fc-471e-b741-6bb0c3040f78', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4312, N'update', 0, N'UPDATE CMS_MetaFile SET [MetaFileObjectID] = @MetaFileObjectID, [MetaFileObjectType] = @MetaFileObjectType, [MetaFileGroupName] = @MetaFileGroupName, [MetaFileName] = @MetaFileName, [MetaFileExtension] = @MetaFileExtension, [MetaFileSize] = @MetaFileSize, [MetaFileMimeType] = @MetaFileMimeType, [MetaFileBinary] = @MetaFileBinary, [MetaFileImageWidth] = @MetaFileImageWidth, [MetaFileImageHeight] = @MetaFileImageHeight, [MetaFileGUID] = @MetaFileGUID, [MetaFileLastModified] = @MetaFileLastModified, [MetaFileSiteID] = @MetaFileSiteID, [MetaFileTitle] = @MetaFileTitle, [MetaFileDescription] = @MetaFileDescription, [MetaFileCustomData] = @MetaFileCustomData WHERE [MetaFileID] = @MetaFileID', 0, 1527, 0, '20081229 09:07:12', 'ab1d6eb8-d080-4c33-b852-99466ebae248', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (12596, N'sortoptionsalphabetically', 1, N'Proc_COM_OptionCategory_SortAlphabetically', 1, 1159, 0, '20110316 10:16:41', '428a4acc-eaae-423b-9dee-99ecbb2497c0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7275, N'isauthorizedperforum', 0, N'SELECT Forums_ForumRoles.ForumID, Forums_ForumRoles.RoleID, Forums_ForumRoles.PermissionID,
 CMS_Permission.PermissionName FROM Forums_ForumRoles INNER JOIN CMS_Permission ON
  CMS_Permission.PermissionID = Forums_ForumRoles.PermissionID WHERE (Forums_ForumRoles.ForumID = 
  @ForumID) AND ((Forums_ForumRoles.RoleID IN (SELECT RoleID FROM View_CMS_UserRoleMembershipRole AS Roles
  WHERE (Roles.SiteID = @SiteID OR Roles.SiteID IS NULL)
   AND Roles.UserID = @UserID AND (Roles.ValidTo IS NULL OR Roles.ValidTo > @Now)
 ))
   OR (Forums_ForumRoles.RoleID    
     IN (SELECT CMS_Role.RoleID FROM CMS_Role WHERE RoleName IN (##GENERICROLES##) AND CMS_Role.SiteID=@SiteID)))', 0, 1122, 0, '20110322 20:59:27', 'b4c6edfd-4c0e-4089-8199-feb4c235519c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2815, N'delete', 0, N'DELETE FROM COM_OrderStatusUser WHERE [OrderStatusUserID] = @ID', 0, 1163, 0, '20081229 09:07:02', '57e2298c-beab-4599-811d-50ba4b7ffbf1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2816, N'insert', 0, N'INSERT INTO COM_OrderStatusUser ([OrderID], [FromStatusID], [ToStatusID], [ChangedByUserID], [Date], [Note] ) VALUES ( @OrderID, @FromStatusID, @ToStatusID, @ChangedByUserID, @Date, @Note); SELECT SCOPE_IDENTITY() AS [OrderStatusUserID]', 1, 1163, 0, '20081229 09:07:02', '465aec3f-529b-4428-a2d5-b3f730bd338b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2817, N'update', 0, N'UPDATE COM_OrderStatusUser SET [OrderID] = @OrderID, [FromStatusID] = @FromStatusID, [ToStatusID] = @ToStatusID, [ChangedByUserID] = @ChangedByUserID, [Date] = @Date, [Note] = @Note WHERE [OrderStatusUserID] = @OrderStatusUserID', 0, 1163, 0, '20081229 09:07:02', '3d048079-b3d1-4b36-9b18-aefc83e643ea', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (666, N'delete', 0, N'DELETE FROM CMS_WebPart WHERE [WebPartID] = @ID', 0, 425, 0, '20110324 14:25:53', 'c709b662-a2d0-4401-b1b4-b353e2a70446', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (661, N'insert', 0, N'INSERT INTO CMS_WebPart ([WebPartName], [WebPartDisplayName], [WebPartDescription], [WebPartFileName], [WebPartProperties], [WebPartCategoryID], [WebPartParentID], [WebPartDocumentation], [WebPartGUID], [WebPartLastModified], [WebPartType], [WebPartLoadGeneration], [WebPartLastSelection], [WebPartDefaultValues], [WebPartResourceID], [WebPartCSS] ) VALUES ( @WebPartName, @WebPartDisplayName, @WebPartDescription, @WebPartFileName, @WebPartProperties, @WebPartCategoryID, @WebPartParentID, @WebPartDocumentation, @WebPartGUID, @WebPartLastModified, @WebPartType, @WebPartLoadGeneration, @WebPartLastSelection, @WebPartDefaultValues, @WebPartResourceID, @WebPartCSS); SELECT SCOPE_IDENTITY() AS [WebPartID]', 1, 425, 0, '20110324 14:25:53', 'fb470cb6-a676-4fe0-ae7e-744dd7a7c78b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (660, N'update', 0, N'UPDATE CMS_WebPart SET [WebPartName] = @WebPartName, [WebPartDisplayName] = @WebPartDisplayName, [WebPartDescription] = @WebPartDescription, [WebPartFileName] = @WebPartFileName, [WebPartProperties] = @WebPartProperties, [WebPartCategoryID] = @WebPartCategoryID, [WebPartParentID] = @WebPartParentID, [WebPartDocumentation] = @WebPartDocumentation, [WebPartGUID] = @WebPartGUID, [WebPartLastModified] = @WebPartLastModified, [WebPartType] = @WebPartType, [WebPartLoadGeneration] = @WebPartLoadGeneration, [WebPartLastSelection] = @WebPartLastSelection, [WebPartDefaultValues] = @WebPartDefaultValues, [WebPartResourceID] = @WebPartResourceID, [WebPartCSS] = @WebPartCSS WHERE [WebPartID] = @WebPartID', 0, 425, 0, '20110324 14:25:53', 'f10ed3b9-e41c-4f97-8f25-4ec9d4a37a2b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4263, N'delete', 0, N'DELETE FROM CMS_WebPartLayout WHERE [WebPartLayoutID] = @ID', 0, 1514, 0, '20110324 14:30:34', '77e0ba1d-8966-4241-bb4c-93e4a31ab2f8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4264, N'insert', 0, N'INSERT INTO CMS_WebPartLayout ([WebPartLayoutCodeName], [WebPartLayoutDisplayName], [WebPartLayoutDescription], [WebPartLayoutCode], [WebPartLayoutCheckedOutFilename], [WebPartLayoutCheckedOutByUserID], [WebPartLayoutCheckedOutMachineName], [WebPartLayoutVersionGUID], [WebPartLayoutWebPartID], [WebPartLayoutGUID], [WebPartLayoutLastModified], [WebPartLayoutCSS] ) VALUES ( @WebPartLayoutCodeName, @WebPartLayoutDisplayName, @WebPartLayoutDescription, @WebPartLayoutCode, @WebPartLayoutCheckedOutFilename, @WebPartLayoutCheckedOutByUserID, @WebPartLayoutCheckedOutMachineName, @WebPartLayoutVersionGUID, @WebPartLayoutWebPartID, @WebPartLayoutGUID, @WebPartLayoutLastModified, @WebPartLayoutCSS); SELECT SCOPE_IDENTITY() AS [WebPartLayoutID]', 1, 1514, 0, '20110324 14:30:34', 'd7b14085-a234-4471-bc01-afd718f06e3c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4265, N'update', 0, N'UPDATE CMS_WebPartLayout SET [WebPartLayoutCodeName] = @WebPartLayoutCodeName, [WebPartLayoutDisplayName] = @WebPartLayoutDisplayName, [WebPartLayoutDescription] = @WebPartLayoutDescription, [WebPartLayoutCode] = @WebPartLayoutCode, [WebPartLayoutCheckedOutFilename] = @WebPartLayoutCheckedOutFilename, [WebPartLayoutCheckedOutByUserID] = @WebPartLayoutCheckedOutByUserID, [WebPartLayoutCheckedOutMachineName] = @WebPartLayoutCheckedOutMachineName, [WebPartLayoutVersionGUID] = @WebPartLayoutVersionGUID, [WebPartLayoutWebPartID] = @WebPartLayoutWebPartID, [WebPartLayoutGUID] = @WebPartLayoutGUID, [WebPartLayoutLastModified] = @WebPartLayoutLastModified, [WebPartLayoutCSS] = @WebPartLayoutCSS WHERE [WebPartLayoutID] = @WebPartLayoutID', 0, 1514, 0, '20110324 14:30:34', '110b9a6d-83c9-463e-96d9-06ad28b59170', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3110, N'delete', 0, N'DELETE FROM CMS_Transformation WHERE [TransformationID] = @ID', 0, 162, 0, '20110324 14:34:44', '612c4593-0fa8-47ec-ac25-fdcb7c89c8b7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3111, N'insert', 0, N'INSERT INTO CMS_Transformation ([TransformationName], [TransformationCode], [TransformationType], [TransformationClassID], [TransformationCheckedOutByUserID], [TransformationCheckedOutMachineName], [TransformationCheckedOutFilename], [TransformationVersionGUID], [TransformationGUID], [TransformationLastModified], [TransformationIsHierarchical], [TransformationHierarchicalXML], [TransformationCSS] ) VALUES ( @TransformationName, @TransformationCode, @TransformationType, @TransformationClassID, @TransformationCheckedOutByUserID, @TransformationCheckedOutMachineName, @TransformationCheckedOutFilename, @TransformationVersionGUID, @TransformationGUID, @TransformationLastModified, @TransformationIsHierarchical, @TransformationHierarchicalXML, @TransformationCSS); SELECT SCOPE_IDENTITY() AS [TransformationID]', 1, 162, 0, '20110324 14:34:44', 'f2197771-340f-4626-aaf4-363e8f3ed2b6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3112, N'update', 0, N'UPDATE CMS_Transformation SET [TransformationName] = @TransformationName, [TransformationCode] = @TransformationCode, [TransformationType] = @TransformationType, [TransformationClassID] = @TransformationClassID, [TransformationCheckedOutByUserID] = @TransformationCheckedOutByUserID, [TransformationCheckedOutMachineName] = @TransformationCheckedOutMachineName, [TransformationCheckedOutFilename] = @TransformationCheckedOutFilename, [TransformationVersionGUID] = @TransformationVersionGUID, [TransformationGUID] = @TransformationGUID, [TransformationLastModified] = @TransformationLastModified, [TransformationIsHierarchical] = @TransformationIsHierarchical, [TransformationHierarchicalXML] = @TransformationHierarchicalXML, [TransformationCSS] = @TransformationCSS WHERE [TransformationID] = @TransformationID', 0, 162, 0, '20110324 14:34:44', 'fc2d2c50-929e-44c4-8074-cd755b33b112', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6558, N'isuserauthorized', 0, N'SELECT RoleID FROM Board_Role WHERE (RoleID IN (SELECT RoleID FROM View_CMS_UserRoleMembershipRole 
WHERE UserID = @ID AND (ValidTo IS NULL OR ValidTo >@ValidTo)) OR
(RoleID IN (SELECT RoleID FROM CMS_Role WHERE RoleName IN ( ##GENERICROLES##) AND CMS_Role.SiteID IN
(SELECT BoardSiteID FROM Board_Board WHERE BoardID = Board_Role.BoardID)))) AND ##WHERE##', 0, 1797, 0, '20110324 15:07:48', '87459632-12a1-123a-1a45-235487961215', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (625, N'delete', 0, N'DELETE FROM CMS_Layout WHERE [LayoutID] = @ID', 0, 410, 0, '20110324 17:07:19', '8430f14e-6806-4156-a654-3b8687e27603', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (621, N'insert', 0, N'INSERT INTO CMS_Layout ([LayoutCodeName], [LayoutDisplayName], [LayoutDescription], [LayoutCode], [LayoutCheckedOutFilename], [LayoutCheckedOutByUserID], [LayoutCheckedOutMachineName], [LayoutVersionGUID], [LayoutGUID], [LayoutLastModified], [LayoutType], [LayoutCSS] ) VALUES ( @LayoutCodeName, @LayoutDisplayName, @LayoutDescription, @LayoutCode, @LayoutCheckedOutFilename, @LayoutCheckedOutByUserID, @LayoutCheckedOutMachineName, @LayoutVersionGUID, @LayoutGUID, @LayoutLastModified, @LayoutType, @LayoutCSS); SELECT SCOPE_IDENTITY() AS [LayoutID]', 1, 410, 0, '20110324 17:07:19', '6b9c72f8-1135-458d-86b8-8195ed480b60', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (618, N'update', 0, N'UPDATE CMS_Layout SET [LayoutCodeName] = @LayoutCodeName, [LayoutDisplayName] = @LayoutDisplayName, [LayoutDescription] = @LayoutDescription, [LayoutCode] = @LayoutCode, [LayoutCheckedOutFilename] = @LayoutCheckedOutFilename, [LayoutCheckedOutByUserID] = @LayoutCheckedOutByUserID, [LayoutCheckedOutMachineName] = @LayoutCheckedOutMachineName, [LayoutVersionGUID] = @LayoutVersionGUID, [LayoutGUID] = @LayoutGUID, [LayoutLastModified] = @LayoutLastModified, [LayoutType] = @LayoutType, [LayoutCSS] = @LayoutCSS WHERE [LayoutID] = @LayoutID', 0, 410, 0, '20110324 17:07:19', 'f73ce49c-2eb6-4cbc-a1e9-0ca18186f85a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7726, N'isauthorized', 0, N'SELECT PermissionName FROM CMS_Permission WHERE PermissionID IN (SELECT Media_LibraryRolePermission.PermissionID 
FROM Media_LibraryRolePermission WHERE LibraryID = @LibraryID AND RoleID IN (
SELECT RoleID FROM View_CMS_UserRoleMembershipRole WHERE UserID=@UserID AND (ValidTo > @ValidTo OR ValidTo IS NULL)
)) AND PermissionName = @PermissionName', 0, 1934, 0, '20110324 17:55:29', '07324780-6813-48e3-8387-9d9a910bed0f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2760, N'delete', 0, N'DELETE FROM COM_Customer WHERE [CustomerID] = @ID', 0, 1157, 0, '20110325 08:38:35', 'eb17e793-2b31-4f72-9b95-cd98f6159b73', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2761, N'insert', 0, N'INSERT INTO COM_Customer ([CustomerFirstName], [CustomerLastName], [CustomerEmail], [CustomerPhone], [CustomerFax], [CustomerCompany], [CustomerUserID], [CustomerPreferredCurrencyID], [CustomerPreferredShippingOptionID], [CustomerCountryID], [CustomerEnabled], [CustomerPrefferedPaymentOptionID], [CustomerStateID], [CustomerGUID], [CustomerTaxRegistrationID], [CustomerOrganizationID], [CustomerDiscountLevelID], [CustomerCreated], [CustomerLastModified], [CustomerSiteID] ) VALUES ( @CustomerFirstName, @CustomerLastName, @CustomerEmail, @CustomerPhone, @CustomerFax, @CustomerCompany, @CustomerUserID, @CustomerPreferredCurrencyID, @CustomerPreferredShippingOptionID, @CustomerCountryID, @CustomerEnabled, @CustomerPrefferedPaymentOptionID, @CustomerStateID, @CustomerGUID, @CustomerTaxRegistrationID, @CustomerOrganizationID, @CustomerDiscountLevelID, @CustomerCreated, @CustomerLastModified, @CustomerSiteID); SELECT SCOPE_IDENTITY() AS [CustomerID]', 1, 1157, 0, '20110325 08:38:35', '232f30c7-613f-46be-bb26-9ffcb2fdb82e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2762, N'update', 0, N'UPDATE COM_Customer SET [CustomerFirstName] = @CustomerFirstName, [CustomerLastName] = @CustomerLastName, [CustomerEmail] = @CustomerEmail, [CustomerPhone] = @CustomerPhone, [CustomerFax] = @CustomerFax, [CustomerCompany] = @CustomerCompany, [CustomerUserID] = @CustomerUserID, [CustomerPreferredCurrencyID] = @CustomerPreferredCurrencyID, [CustomerPreferredShippingOptionID] = @CustomerPreferredShippingOptionID, [CustomerCountryID] = @CustomerCountryID, [CustomerEnabled] = @CustomerEnabled, [CustomerPrefferedPaymentOptionID] = @CustomerPrefferedPaymentOptionID, [CustomerStateID] = @CustomerStateID, [CustomerGUID] = @CustomerGUID, [CustomerTaxRegistrationID] = @CustomerTaxRegistrationID, [CustomerOrganizationID] = @CustomerOrganizationID, [CustomerDiscountLevelID] = @CustomerDiscountLevelID, [CustomerCreated] = @CustomerCreated, [CustomerLastModified] = @CustomerLastModified, [CustomerSiteID] = @CustomerSiteID WHERE [CustomerID] = @CustomerID', 0, 1157, 0, '20110325 08:38:35', '540fdfbf-bc4b-429a-808f-997cef0602ea', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2809, N'delete', 0, N'DELETE FROM COM_ShoppingCart WHERE [ShoppingCartID] = @ID', 0, 1162, 0, '20110325 08:41:38', '61bc19d8-258c-4f96-8e88-7cefd28425be', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2810, N'insert', 0, N'INSERT INTO COM_ShoppingCart ([ShoppingCartGUID], [ShoppingCartUserID], [ShoppingCartSiteID], [ShoppingCartLastUpdate], [ShoppingCartCurrencyID], [ShoppingCartPaymentOptionID], [ShoppingCartShippingOptionID], [ShoppingCartDiscountCouponID], [ShoppingCartBillingAddressID], [ShoppingCartShippingAddressID], [ShoppingCartCustomerID], [ShoppingCartNote], [ShoppingCartCompanyAddressID], [ShoppingCartCustomData] ) VALUES ( @ShoppingCartGUID, @ShoppingCartUserID, @ShoppingCartSiteID, @ShoppingCartLastUpdate, @ShoppingCartCurrencyID, @ShoppingCartPaymentOptionID, @ShoppingCartShippingOptionID, @ShoppingCartDiscountCouponID, @ShoppingCartBillingAddressID, @ShoppingCartShippingAddressID, @ShoppingCartCustomerID, @ShoppingCartNote, @ShoppingCartCompanyAddressID, @ShoppingCartCustomData); SELECT SCOPE_IDENTITY() AS [ShoppingCartID]', 1, 1162, 0, '20110325 08:41:38', '4d9463e1-0a78-444e-a261-e4754acca61f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2811, N'update', 0, N'UPDATE COM_ShoppingCart SET [ShoppingCartGUID] = @ShoppingCartGUID, [ShoppingCartUserID] = @ShoppingCartUserID, [ShoppingCartSiteID] = @ShoppingCartSiteID, [ShoppingCartLastUpdate] = @ShoppingCartLastUpdate, [ShoppingCartCurrencyID] = @ShoppingCartCurrencyID, [ShoppingCartPaymentOptionID] = @ShoppingCartPaymentOptionID, [ShoppingCartShippingOptionID] = @ShoppingCartShippingOptionID, [ShoppingCartDiscountCouponID] = @ShoppingCartDiscountCouponID, [ShoppingCartBillingAddressID] = @ShoppingCartBillingAddressID, [ShoppingCartShippingAddressID] = @ShoppingCartShippingAddressID, [ShoppingCartCustomerID] = @ShoppingCartCustomerID, [ShoppingCartNote] = @ShoppingCartNote, [ShoppingCartCompanyAddressID] = @ShoppingCartCompanyAddressID, [ShoppingCartCustomData] = @ShoppingCartCustomData WHERE [ShoppingCartID] = @ShoppingCartID', 0, 1162, 0, '20110325 08:41:38', '1596e2a7-3da2-49d6-bf13-4e6117fcf9fd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7673, N'UpdateQuestionSolved', 0, N'UPDATE Forums_ForumPost SET PostQuestionSolved = CASE WHEN EXISTS (SELECT * FROM Forums_ForumPost p WHERE (p.PostForumID = @ForumID) AND (p.PostIDPath LIKE Forums_ForumPost.PostIDPath + ''%'') AND @Limit <= (ISNULL(p.PostIsAnswer, 0) -  ISNULL(p.PostIsNotAnswer, 0))) THEN 1 ELSE 0 END WHERE (Forums_ForumPost.PostForumID = @ForumID) AND (Forums_ForumPost.PostLevel = 0) AND (@PostIDPath = '''' OR Forums_ForumPost.PostIDPath = @PostIDPath)', 0, 1122, 0, '20110330 08:37:31', '4137abeb-8fa5-48da-8188-dd94874d05f4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3401, N'delete', 0, N'DELETE FROM Reporting_ReportGraph WHERE [GraphID] = @ID', 0, 1339, 0, '20110404 13:42:57', '80c62706-657b-46a9-b83a-0788e5765f22', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3402, N'insert', 0, N'INSERT INTO Reporting_ReportGraph ([GraphName], [GraphDisplayName], [GraphQuery], [GraphQueryIsStoredProcedure], [GraphType], [GraphReportID], [GraphTitle], [GraphXAxisTitle], [GraphYAxisTitle], [GraphWidth], [GraphHeight], [GraphLegendPosition], [GraphSettings], [GraphGUID], [GraphLastModified], [GraphIsHtml] ) VALUES ( @GraphName, @GraphDisplayName, @GraphQuery, @GraphQueryIsStoredProcedure, @GraphType, @GraphReportID, @GraphTitle, @GraphXAxisTitle, @GraphYAxisTitle, @GraphWidth, @GraphHeight, @GraphLegendPosition, @GraphSettings, @GraphGUID, @GraphLastModified, @GraphIsHtml); SELECT SCOPE_IDENTITY() AS [GraphID]', 1, 1339, 0, '20110404 13:42:57', 'd30e40a0-7f9f-47be-8c79-bc129829e3a1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3403, N'update', 0, N'UPDATE Reporting_ReportGraph SET [GraphName] = @GraphName, [GraphDisplayName] = @GraphDisplayName, [GraphQuery] = @GraphQuery, [GraphQueryIsStoredProcedure] = @GraphQueryIsStoredProcedure, [GraphType] = @GraphType, [GraphReportID] = @GraphReportID, [GraphTitle] = @GraphTitle, [GraphXAxisTitle] = @GraphXAxisTitle, [GraphYAxisTitle] = @GraphYAxisTitle, [GraphWidth] = @GraphWidth, [GraphHeight] = @GraphHeight, [GraphLegendPosition] = @GraphLegendPosition, [GraphSettings] = @GraphSettings, [GraphGUID] = @GraphGUID, [GraphLastModified] = @GraphLastModified, [GraphIsHtml] = @GraphIsHtml WHERE [GraphID] = @GraphID', 0, 1339, 0, '20110404 13:42:57', '19ad9269-b8a5-46dd-89ae-a0b8d766cee0', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4278, N'delete', 0, N'DELETE FROM COM_CustomerCreditHistory WHERE [EventID] = @ID', 0, 1518, 0, '20110412 08:04:09', 'c9fc07a2-ad48-45a0-a43d-1a2c6f931a43', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4277, N'insert', 0, N'INSERT INTO COM_CustomerCreditHistory ([EventName], [EventCreditChange], [EventDate], [EventDescription], [EventCustomerID], [EventCreditGUID], [EventCreditLastModified], [EventSiteID] ) VALUES ( @EventName, @EventCreditChange, @EventDate, @EventDescription, @EventCustomerID, @EventCreditGUID, @EventCreditLastModified, @EventSiteID); SELECT SCOPE_IDENTITY() AS [EventID]', 1, 1518, 0, '20110412 08:04:09', 'e8dae548-c527-4f23-a905-2e0a9227e2ee', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4279, N'update', 0, N'UPDATE COM_CustomerCreditHistory SET [EventName] = @EventName, [EventCreditChange] = @EventCreditChange, [EventDate] = @EventDate, [EventDescription] = @EventDescription, [EventCustomerID] = @EventCustomerID, [EventCreditGUID] = @EventCreditGUID, [EventCreditLastModified] = @EventCreditLastModified, [EventSiteID] = @EventSiteID WHERE [EventID] = @EventID', 0, 1518, 0, '20110412 08:04:09', '04f544fe-45d9-4f6c-83d9-f04308c1f26e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (180, N'delete', 0, N'DELETE FROM CMS_Permission WHERE [PermissionID] = @ID', 0, 131, 0, '20110415 13:05:42', '4ee5337d-60e1-40ed-a0b9-808c69dc03b3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (179, N'insert', 0, N'INSERT INTO CMS_Permission ([PermissionDisplayName], [PermissionName], [ClassID], [ResourceID], [PermissionGUID], [PermissionLastModified], [PermissionDescription], [PermissionDisplayInMatrix], [PermissionOrder], [PermissionEditableByGlobalAdmin] ) VALUES ( @PermissionDisplayName, @PermissionName, @ClassID, @ResourceID, @PermissionGUID, @PermissionLastModified, @PermissionDescription, @PermissionDisplayInMatrix, @PermissionOrder, @PermissionEditableByGlobalAdmin); SELECT SCOPE_IDENTITY() AS [PermissionID]', 1, 131, 0, '20110415 13:05:42', 'a90ff915-1e5d-4e11-b0d7-a3a09f56130e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (178, N'update', 0, N'UPDATE CMS_Permission SET [PermissionDisplayName] = @PermissionDisplayName, [PermissionName] = @PermissionName, [ClassID] = @ClassID, [ResourceID] = @ResourceID, [PermissionGUID] = @PermissionGUID, [PermissionLastModified] = @PermissionLastModified, [PermissionDescription] = @PermissionDescription, [PermissionDisplayInMatrix] = @PermissionDisplayInMatrix, [PermissionOrder] = @PermissionOrder, [PermissionEditableByGlobalAdmin] = @PermissionEditableByGlobalAdmin WHERE [PermissionID] = @PermissionID', 0, 131, 0, '20110415 13:05:42', 'eeb0ad53-41e0-4327-b7c2-675ee0e28c5f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5111, N'delete', 0, N'DELETE FROM CMS_UserSite WHERE [UserSiteID] = @ID', 0, 1634, 0, '20110427 10:01:31', 'f9cdbd52-13bd-417b-a0e5-a99488e36a3f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5112, N'insert', 0, N'INSERT INTO CMS_UserSite ([UserID], [SiteID], [UserPreferredCurrencyID], [UserPreferredShippingOptionID], [UserPreferredPaymentOptionID], [UserDiscountLevelID] ) VALUES ( @UserID, @SiteID, @UserPreferredCurrencyID, @UserPreferredShippingOptionID, @UserPreferredPaymentOptionID, @UserDiscountLevelID); SELECT SCOPE_IDENTITY() AS [UserSiteID]', 1, 1634, 0, '20110427 10:01:31', '8c3e4dfc-c412-4ee9-8549-cfd8d927bfcb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5113, N'update', 0, N'UPDATE CMS_UserSite SET [UserID] = @UserID, [SiteID] = @SiteID, [UserPreferredCurrencyID] = @UserPreferredCurrencyID, [UserPreferredShippingOptionID] = @UserPreferredShippingOptionID, [UserPreferredPaymentOptionID] = @UserPreferredPaymentOptionID, [UserDiscountLevelID] = @UserDiscountLevelID WHERE [UserSiteID] = @UserSiteID', 0, 1634, 0, '20110427 10:01:31', '62902026-c1aa-466d-b4e7-04ce87a8988a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3531, N'deleteall', 0, N'DELETE FROM Reporting_ReportValue WHERE ##WHERE##', 0, 1342, 0, '20110428 00:17:28', '2ac4db9e-fbe7-4cc0-b399-deb9d6df7eed', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3530, N'deleteall', 0, N'DELETE FROM Reporting_ReportTable WHERE ##WHERE##', 0, 1341, 0, '20110428 02:28:26', 'eaff3093-0d1b-4756-8c7c-6ce59896f65d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3958, N'delete', 0, N'DELETE FROM COM_TaxClassState WHERE [TaxClassStateID] = @ID', 0, 1448, 0, '20110428 13:36:02', '609aec94-f36f-43da-a4ad-a40d521c9a27', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3959, N'insert', 0, N'INSERT INTO COM_TaxClassState ([TaxClassID], [StateID], [TaxValue], [IsFlatValue] ) VALUES ( @TaxClassID, @StateID, @TaxValue, @IsFlatValue); SELECT SCOPE_IDENTITY() AS [TaxClassStateID]', 1, 1448, 0, '20110428 13:36:02', '15b2444a-e1e2-47f0-a457-6b20f020c713', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3960, N'update', 0, N'UPDATE COM_TaxClassState SET [TaxClassID] = @TaxClassID, [StateID] = @StateID, [TaxValue] = @TaxValue, [IsFlatValue] = @IsFlatValue WHERE [TaxClassStateID] = @TaxClassStateID', 0, 1448, 0, '20110428 13:36:02', '6324aed7-e466-4033-8276-80df55ce6967', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2785, N'delete', 0, N'DELETE FROM COM_TaxClassCountry WHERE [TaxClassCountryID] = @ID', 0, 1154, 0, '20110428 13:56:33', 'eea32af0-ff62-4e86-8e73-350749437994', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2786, N'insert', 0, N'INSERT INTO COM_TaxClassCountry ([TaxClassID], [CountryID], [TaxValue], [IsFlatValue] ) VALUES ( @TaxClassID, @CountryID, @TaxValue, @IsFlatValue); SELECT SCOPE_IDENTITY() AS [TaxClassCountryID]', 1, 1154, 0, '20110428 13:56:33', '30ea74f3-1271-4e6f-b78c-9a9af11cedd3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2787, N'update', 0, N'UPDATE COM_TaxClassCountry SET [TaxClassID] = @TaxClassID, [CountryID] = @CountryID, [TaxValue] = @TaxValue, [IsFlatValue] = @IsFlatValue WHERE [TaxClassCountryID] = @TaxClassCountryID', 0, 1154, 0, '20110428 13:56:33', '1de00ca2-1fe5-43d2-9e2e-2b31122875a1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (432, N'delete', 0, N'DELETE FROM CMS_VersionHistory WHERE [VersionHistoryID] = @ID', 0, 214, 0, '20110428 21:51:39', '71fa28bd-2582-4420-ae3d-7ea8ad0b9957', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (433, N'insert', 0, N'INSERT INTO CMS_VersionHistory ([NodeSiteID], [DocumentID], [DocumentNamePath], [NodeXML], [ModifiedByUserID], [ModifiedWhen], [VersionNumber], [VersionComment], [ToBePublished], [PublishFrom], [PublishTo], [WasPublishedFrom], [WasPublishedTo], [VersionDocumentName], [VersionDocumentType], [VersionClassID], [VersionMenuRedirectUrl], [VersionWorkflowID], [VersionWorkflowStepID], [VersionNodeAliasPath], [VersionDeletedByUserID], [VersionDeletedWhen] ) VALUES ( @NodeSiteID, @DocumentID, @DocumentNamePath, @NodeXML, @ModifiedByUserID, @ModifiedWhen, @VersionNumber, @VersionComment, @ToBePublished, @PublishFrom, @PublishTo, @WasPublishedFrom, @WasPublishedTo, @VersionDocumentName, @VersionDocumentType, @VersionClassID, @VersionMenuRedirectUrl, @VersionWorkflowID, @VersionWorkflowStepID, @VersionNodeAliasPath, @VersionDeletedByUserID, @VersionDeletedWhen); SELECT SCOPE_IDENTITY() AS [VersionHistoryID]', 1, 214, 0, '20110428 21:51:39', '93aa7600-ea5a-4cf5-ada4-de3f66bb69d3', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (434, N'update', 0, N'UPDATE CMS_VersionHistory SET [NodeSiteID] = @NodeSiteID, [DocumentID] = @DocumentID, [DocumentNamePath] = @DocumentNamePath, [NodeXML] = @NodeXML, [ModifiedByUserID] = @ModifiedByUserID, [ModifiedWhen] = @ModifiedWhen, [VersionNumber] = @VersionNumber, [VersionComment] = @VersionComment, [ToBePublished] = @ToBePublished, [PublishFrom] = @PublishFrom, [PublishTo] = @PublishTo, [WasPublishedFrom] = @WasPublishedFrom, [WasPublishedTo] = @WasPublishedTo, [VersionDocumentName] = @VersionDocumentName, [VersionDocumentType] = @VersionDocumentType, [VersionClassID] = @VersionClassID, [VersionMenuRedirectUrl] = @VersionMenuRedirectUrl, [VersionWorkflowID] = @VersionWorkflowID, [VersionWorkflowStepID] = @VersionWorkflowStepID, [VersionNodeAliasPath] = @VersionNodeAliasPath, [VersionDeletedByUserID] = @VersionDeletedByUserID, [VersionDeletedWhen] = @VersionDeletedWhen WHERE [VersionHistoryID] = @VersionHistoryID', 0, 214, 0, '20110428 21:51:39', 'de744238-5e49-4a88-8c7e-7a40be89213e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (217, N'delete', 0, N'DELETE FROM CMS_Tree WHERE [NodeID] = @ID', 0, 143, 0, '20110509 14:14:40', '92b6a198-998e-434a-9c55-e13f4c0edb2c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (218, N'insert', 0, N'INSERT INTO CMS_Tree ([NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeParentID], [NodeLevel], [NodeACLID], [NodeSiteID], [NodeGUID], [NodeOrder], [IsSecuredNode], [NodeCacheMinutes], [NodeSKUID], [NodeDocType], [NodeHeadTags], [NodeBodyElementAttributes], [NodeInheritPageLevels], [NodeChildNodesCount], [RequiresSSL], [NodeLinkedNodeID], [NodeOwner], [NodeCustomData], [NodeGroupID], [NodeLinkedNodeSiteID] ) VALUES ( @NodeAliasPath, @NodeName, @NodeAlias, @NodeClassID, @NodeParentID, @NodeLevel, @NodeACLID, @NodeSiteID, @NodeGUID, @NodeOrder, @IsSecuredNode, @NodeCacheMinutes, @NodeSKUID, @NodeDocType, @NodeHeadTags, @NodeBodyElementAttributes, @NodeInheritPageLevels, @NodeChildNodesCount, @RequiresSSL, @NodeLinkedNodeID, @NodeOwner, @NodeCustomData, @NodeGroupID, @NodeLinkedNodeSiteID); SELECT SCOPE_IDENTITY() AS [NodeID]', 1, 143, 0, '20110509 14:14:40', 'ba788c1c-3db2-4720-93e2-4817381c47a4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (219, N'update', 0, N'UPDATE CMS_Tree SET [NodeAliasPath] = @NodeAliasPath, [NodeName] = @NodeName, [NodeAlias] = @NodeAlias, [NodeClassID] = @NodeClassID, [NodeParentID] = @NodeParentID, [NodeLevel] = @NodeLevel, [NodeACLID] = @NodeACLID, [NodeSiteID] = @NodeSiteID, [NodeGUID] = @NodeGUID, [NodeOrder] = @NodeOrder, [IsSecuredNode] = @IsSecuredNode, [NodeCacheMinutes] = @NodeCacheMinutes, [NodeSKUID] = @NodeSKUID, [NodeDocType] = @NodeDocType, [NodeHeadTags] = @NodeHeadTags, [NodeBodyElementAttributes] = @NodeBodyElementAttributes, [NodeInheritPageLevels] = @NodeInheritPageLevels, [NodeChildNodesCount] = @NodeChildNodesCount, [RequiresSSL] = @RequiresSSL, [NodeLinkedNodeID] = @NodeLinkedNodeID, [NodeOwner] = @NodeOwner, [NodeCustomData] = @NodeCustomData, [NodeGroupID] = @NodeGroupID, [NodeLinkedNodeSiteID] = @NodeLinkedNodeSiteID WHERE [NodeID] = @NodeID', 0, 143, 0, '20110509 14:14:40', 'bb87c442-11a0-4733-a88a-9d6e76a4302c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2673, N'delete', 0, N'DELETE FROM COM_OrderStatus WHERE [StatusID] = @ID', 0, 1146, 0, '20110516 14:54:41', '34bdcdf2-01e3-419e-bb7d-23d59684cedd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2674, N'insert', 0, N'INSERT INTO COM_OrderStatus ([StatusName], [StatusDisplayName], [StatusOrder], [StatusEnabled], [StatusColor], [StatusGUID], [StatusLastModified], [StatusSendNotification], [StatusSiteID], [StatusOrderIsPaid] ) VALUES ( @StatusName, @StatusDisplayName, @StatusOrder, @StatusEnabled, @StatusColor, @StatusGUID, @StatusLastModified, @StatusSendNotification, @StatusSiteID, @StatusOrderIsPaid); SELECT SCOPE_IDENTITY() AS [StatusID]', 1, 1146, 0, '20110516 14:54:41', 'da7f7eec-4aa1-43e6-b71f-85d4502d74ff', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2675, N'update', 0, N'UPDATE COM_OrderStatus SET [StatusName] = @StatusName, [StatusDisplayName] = @StatusDisplayName, [StatusOrder] = @StatusOrder, [StatusEnabled] = @StatusEnabled, [StatusColor] = @StatusColor, [StatusGUID] = @StatusGUID, [StatusLastModified] = @StatusLastModified, [StatusSendNotification] = @StatusSendNotification, [StatusSiteID] = @StatusSiteID, [StatusOrderIsPaid] = @StatusOrderIsPaid WHERE [StatusID] = @StatusID', 0, 1146, 0, '20110516 14:54:41', 'caa77a95-35f2-4ddc-8d03-fc669b700228', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6039, N'delete', 0, N'DELETE FROM CMS_Category WHERE [CategoryID] = @ID', 0, 1721, 0, '20110519 07:36:11', 'd746bfd2-f44d-41e8-9030-7bad404c2a7b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6040, N'insert', 0, N'INSERT INTO CMS_Category ([CategoryDisplayName], [CategoryName], [CategoryDescription], [CategoryCount], [CategoryEnabled], [CategoryUserID], [CategoryGUID], [CategoryLastModified], [CategorySiteID], [CategoryParentID], [CategoryIDPath], [CategoryNamePath], [CategoryLevel], [CategoryOrder] ) VALUES ( @CategoryDisplayName, @CategoryName, @CategoryDescription, @CategoryCount, @CategoryEnabled, @CategoryUserID, @CategoryGUID, @CategoryLastModified, @CategorySiteID, @CategoryParentID, @CategoryIDPath, @CategoryNamePath, @CategoryLevel, @CategoryOrder); SELECT SCOPE_IDENTITY() AS [CategoryID]', 1, 1721, 0, '20110519 07:36:11', 'd8ae1531-9b1a-403e-993f-5bec9f9ef02f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6041, N'update', 0, N'UPDATE CMS_Category SET [CategoryDisplayName] = @CategoryDisplayName, [CategoryName] = @CategoryName, [CategoryDescription] = @CategoryDescription, [CategoryCount] = @CategoryCount, [CategoryEnabled] = @CategoryEnabled, [CategoryUserID] = @CategoryUserID, [CategoryGUID] = @CategoryGUID, [CategoryLastModified] = @CategoryLastModified, [CategorySiteID] = @CategorySiteID, [CategoryParentID] = @CategoryParentID, [CategoryIDPath] = @CategoryIDPath, [CategoryNamePath] = @CategoryNamePath, [CategoryLevel] = @CategoryLevel, [CategoryOrder] = @CategoryOrder WHERE [CategoryID] = @CategoryID', 0, 1721, 0, '20110519 07:36:11', '29d867f8-6d91-4e5b-b6b2-b7f3c7fa8211', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (13071, N'initorders', 1, N'Proc_CMS_Category_InitOrders', 0, 1721, 0, '20110519 14:02:33', '341074f9-e053-4bb5-acd0-be679801153d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (13072, N'moveup', 1, N'Proc_CMS_Category_MoveUp', 0, 1721, 0, '20110519 14:02:52', '79d2be4c-61ab-4399-bb44-4d14ec4f1bfb', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (13073, N'movedown', 1, N'Proc_CMS_Category_MoveDown', 0, 1721, 0, '20110519 14:03:14', '7ce0fe1f-a94f-4882-a25f-e613812b46a8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (13074, N'updateidpath', 1, N'Proc_CMS_Category_UpdateIDPath', 0, 1721, 0, '20110519 15:59:03', '47e19690-0b6b-41a2-ba3c-8aed16e8ecd7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (13078, N'updatenamepath', 1, N'Proc_CMS_Category_UpdateNamePath', 0, 1721, 0, '20110519 17:43:43', '97210f1f-51b8-448f-b86c-2e939b34a938', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3335, N'delete', 0, N'DELETE FROM Polls_Poll WHERE [PollID] = @ID', 0, 1330, 0, '20110524 09:35:17', '633d8de2-a8b0-41a7-85d3-21e989247303', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3336, N'insert', 0, N'INSERT INTO Polls_Poll ([PollCodeName], [PollDisplayName], [PollTitle], [PollOpenFrom], [PollOpenTo], [PollAllowMultipleAnswers], [PollQuestion], [PollAccess], [PollResponseMessage], [PollGUID], [PollLastModified], [PollGroupID], [PollSiteID], [PollLogActivity] ) VALUES ( @PollCodeName, @PollDisplayName, @PollTitle, @PollOpenFrom, @PollOpenTo, @PollAllowMultipleAnswers, @PollQuestion, @PollAccess, @PollResponseMessage, @PollGUID, @PollLastModified, @PollGroupID, @PollSiteID, @PollLogActivity); SELECT SCOPE_IDENTITY() AS [PollID]', 1, 1330, 0, '20110524 09:35:17', 'b97133fa-9ada-48b5-b395-d97a45171bde', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3337, N'update', 0, N'UPDATE Polls_Poll SET [PollCodeName] = @PollCodeName, [PollDisplayName] = @PollDisplayName, [PollTitle] = @PollTitle, [PollOpenFrom] = @PollOpenFrom, [PollOpenTo] = @PollOpenTo, [PollAllowMultipleAnswers] = @PollAllowMultipleAnswers, [PollQuestion] = @PollQuestion, [PollAccess] = @PollAccess, [PollResponseMessage] = @PollResponseMessage, [PollGUID] = @PollGUID, [PollLastModified] = @PollLastModified, [PollGroupID] = @PollGroupID, [PollSiteID] = @PollSiteID, [PollLogActivity] = @PollLogActivity WHERE [PollID] = @PollID', 0, 1330, 0, '20110524 09:35:17', '6d6a9cf3-307e-4606-ad0a-76c82ffb80c6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7274, N'getPermissionMatrix', 0, N'SELECT ##TOPN## Matrix.##COLUMNS##, CASE WHEN Forums_ForumRoles.RoleID IS NULL THEN 0 ELSE 1 END AS Allowed FROM (SELECT CMS_Permission.PermissionID, CMS_Permission.PermissionDisplayName, CMS_Permission.PermissionName, CMS_Permission.PermissionDescription, CMS_Role.RoleID, CMS_Role.Rolename, CMS_Role.RoleDisplayName, CMS_Role.SiteID FROM CMS_Permission, CMS_Role WHERE ResourceID = @ID AND RoleID IN (SELECT RoleID FROM CMS_Role WHERE ##WHERE## AND (SiteID IS NULL OR SiteID = @SiteID OR @SiteID = 0))) Matrix LEFT JOIN Forums_ForumRoles ON (Matrix.PermissionID = Forums_ForumRoles.PermissionID AND Forums_ForumRoles.RoleID = Matrix.RoleID AND Forums_ForumRoles.ForumID = @ForumID) ORDER BY ##ORDERBY##', 0, 1644, 0, '20110527 16:27:09', '5dac9354-d25a-43e6-8a0d-682709b41bd5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7622, N'getPermissionMatrix', 0, N'SELECT ##TOPN## Matrix.##COLUMNS##, CASE WHEN Media_LibraryRolePermission.RoleID IS NULL THEN 0 ELSE 1 END AS Allowed FROM 
(SELECT CMS_Permission.PermissionID, CMS_Permission.PermissionDisplayName, CMS_Permission.PermissionName, CMS_Permission.PermissionDescription, CMS_Role.RoleID, 
CMS_Role.Rolename, CMS_Role.RoleDisplayName, CMS_Role.SiteID FROM CMS_Permission, CMS_Role WHERE ResourceID = @ID AND 
RoleID IN (SELECT RoleID FROM CMS_Role WHERE ##WHERE## AND (SiteID IS NULL OR SiteID = @SiteID))) 
Matrix 
LEFT JOIN Media_LibraryRolePermission ON (Matrix.PermissionID = Media_LibraryRolePermission.PermissionID AND Media_LibraryRolePermission.RoleID = Matrix.RoleID AND Media_LibraryRolePermission.LibraryID= @LibraryID) ORDER BY ##ORDERBY##', 0, 1934, 0, '20110527 16:46:35', '01eadf08-d4d8-464d-8e75-e76c092add1a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6917, N'delete', 0, N'DELETE FROM Community_Friend WHERE [FriendID] = @ID', 0, 1898, 0, '20110530 11:40:40', '9a6c18b2-443f-417c-aac5-915504f960ff', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6918, N'insert', 0, N'INSERT INTO Community_Friend ([FriendRequestedUserID], [FriendUserID], [FriendRequestedWhen], [FriendComment], [FriendApprovedBy], [FriendApprovedWhen], [FriendRejectedBy], [FriendRejectedWhen], [FriendGUID], [FriendStatus] ) VALUES ( @FriendRequestedUserID, @FriendUserID, @FriendRequestedWhen, @FriendComment, @FriendApprovedBy, @FriendApprovedWhen, @FriendRejectedBy, @FriendRejectedWhen, @FriendGUID, @FriendStatus); SELECT SCOPE_IDENTITY() AS [FriendID]', 1, 1898, 0, '20110530 11:40:40', '5bf9fd6d-415d-4c02-a1d6-4d57ddc1f472', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6919, N'update', 0, N'UPDATE Community_Friend SET [FriendRequestedUserID] = @FriendRequestedUserID, [FriendUserID] = @FriendUserID, [FriendRequestedWhen] = @FriendRequestedWhen, [FriendComment] = @FriendComment, [FriendApprovedBy] = @FriendApprovedBy, [FriendApprovedWhen] = @FriendApprovedWhen, [FriendRejectedBy] = @FriendRejectedBy, [FriendRejectedWhen] = @FriendRejectedWhen, [FriendGUID] = @FriendGUID, [FriendStatus] = @FriendStatus WHERE [FriendID] = @FriendID', 0, 1898, 0, '20110530 11:40:40', 'da4944dc-6f8d-426c-ae9c-a0fca71caafe', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1342, N'delete', 0, N'DELETE FROM Newsletter_Newsletter WHERE [NewsletterID] = @ID', 0, 913, 0, '20110603 15:41:52', '2563caec-ec2c-4519-a668-933d892ae47f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1343, N'insert', 0, N'INSERT INTO Newsletter_Newsletter ([NewsletterDisplayName], [NewsletterName], [NewsletterType], [NewsletterSubscriptionTemplateID], [NewsletterUnsubscriptionTemplateID], [NewsletterSenderName], [NewsletterSenderEmail], [NewsletterDynamicSubject], [NewsletterDynamicURL], [NewsletterDynamicScheduledTaskID], [NewsletterTemplateID], [NewsletterSiteID], [NewsletterGUID], [NewsletterUnsubscribeUrl], [NewsletterBaseUrl], [NewsletterLastModified], [NewsletterUseEmailQueue], [NewsletterEnableOptIn], [NewsletterOptInTemplateID], [NewsletterSendOptInConfirmation], [NewsletterOptInApprovalURL], [NewsletterTrackOpenEmails], [NewsletterTrackClickedLinks], [NewsletterDraftEmails], [NewsletterLogActivity] ) VALUES ( @NewsletterDisplayName, @NewsletterName, @NewsletterType, @NewsletterSubscriptionTemplateID, @NewsletterUnsubscriptionTemplateID, @NewsletterSenderName, @NewsletterSenderEmail, @NewsletterDynamicSubject, @NewsletterDynamicURL, @NewsletterDynamicScheduledTaskID, @NewsletterTemplateID, @NewsletterSiteID, @NewsletterGUID, @NewsletterUnsubscribeUrl, @NewsletterBaseUrl, @NewsletterLastModified, @NewsletterUseEmailQueue, @NewsletterEnableOptIn, @NewsletterOptInTemplateID, @NewsletterSendOptInConfirmation, @NewsletterOptInApprovalURL, @NewsletterTrackOpenEmails, @NewsletterTrackClickedLinks, @NewsletterDraftEmails, @NewsletterLogActivity); SELECT SCOPE_IDENTITY() AS [NewsletterID]', 1, 913, 0, '20110603 15:41:52', '1175e689-f732-4b30-b24d-3ccb113ea330', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1344, N'update', 0, N'UPDATE Newsletter_Newsletter SET [NewsletterDisplayName] = @NewsletterDisplayName, [NewsletterName] = @NewsletterName, [NewsletterType] = @NewsletterType, [NewsletterSubscriptionTemplateID] = @NewsletterSubscriptionTemplateID, [NewsletterUnsubscriptionTemplateID] = @NewsletterUnsubscriptionTemplateID, [NewsletterSenderName] = @NewsletterSenderName, [NewsletterSenderEmail] = @NewsletterSenderEmail, [NewsletterDynamicSubject] = @NewsletterDynamicSubject, [NewsletterDynamicURL] = @NewsletterDynamicURL, [NewsletterDynamicScheduledTaskID] = @NewsletterDynamicScheduledTaskID, [NewsletterTemplateID] = @NewsletterTemplateID, [NewsletterSiteID] = @NewsletterSiteID, [NewsletterGUID] = @NewsletterGUID, [NewsletterUnsubscribeUrl] = @NewsletterUnsubscribeUrl, [NewsletterBaseUrl] = @NewsletterBaseUrl, [NewsletterLastModified] = @NewsletterLastModified, [NewsletterUseEmailQueue] = @NewsletterUseEmailQueue, [NewsletterEnableOptIn] = @NewsletterEnableOptIn, [NewsletterOptInTemplateID] = @NewsletterOptInTemplateID, [NewsletterSendOptInConfirmation] = @NewsletterSendOptInConfirmation, [NewsletterOptInApprovalURL] = @NewsletterOptInApprovalURL, [NewsletterTrackOpenEmails] = @NewsletterTrackOpenEmails, [NewsletterTrackClickedLinks] = @NewsletterTrackClickedLinks, [NewsletterDraftEmails] = @NewsletterDraftEmails, [NewsletterLogActivity] = @NewsletterLogActivity WHERE [NewsletterID] = @NewsletterID', 0, 913, 0, '20110603 15:41:52', '9b0c950a-e36f-47e4-b75a-3d430dfe5f71', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6264, N'delete', 0, N'DELETE FROM CMS_Avatar WHERE [AvatarID] = @ID', 0, 1750, 0, '20110607 08:54:16', '5e4f8491-b46c-47ef-a8c5-2ad2e68b53df', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6265, N'insert', 0, N'INSERT INTO CMS_Avatar ([AvatarName], [AvatarFileName], [AvatarFileExtension], [AvatarBinary], [AvatarType], [AvatarIsCustom], [AvatarGUID], [AvatarLastModified], [AvatarMimeType], [AvatarFileSize], [AvatarImageHeight], [AvatarImageWidth], [DefaultMaleUserAvatar], [DefaultFemaleUserAvatar], [DefaultGroupAvatar], [DefaultUserAvatar] ) VALUES ( @AvatarName, @AvatarFileName, @AvatarFileExtension, @AvatarBinary, @AvatarType, @AvatarIsCustom, @AvatarGUID, @AvatarLastModified, @AvatarMimeType, @AvatarFileSize, @AvatarImageHeight, @AvatarImageWidth, @DefaultMaleUserAvatar, @DefaultFemaleUserAvatar, @DefaultGroupAvatar, @DefaultUserAvatar); SELECT SCOPE_IDENTITY() AS [AvatarID]', 1, 1750, 0, '20110607 08:54:16', '3bb89b9a-d7c1-4d7e-9bd5-e557587c0f6a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6266, N'update', 0, N'UPDATE CMS_Avatar SET [AvatarName] = @AvatarName, [AvatarFileName] = @AvatarFileName, [AvatarFileExtension] = @AvatarFileExtension, [AvatarBinary] = @AvatarBinary, [AvatarType] = @AvatarType, [AvatarIsCustom] = @AvatarIsCustom, [AvatarGUID] = @AvatarGUID, [AvatarLastModified] = @AvatarLastModified, [AvatarMimeType] = @AvatarMimeType, [AvatarFileSize] = @AvatarFileSize, [AvatarImageHeight] = @AvatarImageHeight, [AvatarImageWidth] = @AvatarImageWidth, [DefaultMaleUserAvatar] = @DefaultMaleUserAvatar, [DefaultFemaleUserAvatar] = @DefaultFemaleUserAvatar, [DefaultGroupAvatar] = @DefaultGroupAvatar, [DefaultUserAvatar] = @DefaultUserAvatar WHERE [AvatarID] = @AvatarID', 0, 1750, 0, '20110607 08:54:16', 'd70db9b5-4ba5-4d06-bbf4-22d4755b177f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3470, N'delete', 0, N'DELETE FROM Reporting_SavedGraph WHERE [SavedGraphID] = @ID', 0, 1349, 0, '20110607 08:54:39', '592b0ccb-95bd-475a-a43d-ee43d93aa14b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3471, N'insert', 0, N'INSERT INTO Reporting_SavedGraph ([SavedGraphSavedReportID], [SavedGraphGUID], [SavedGraphBinary], [SavedGraphMimeType], [SavedGraphLastModified] ) VALUES ( @SavedGraphSavedReportID, @SavedGraphGUID, @SavedGraphBinary, @SavedGraphMimeType, @SavedGraphLastModified); SELECT SCOPE_IDENTITY() AS [SavedGraphID]', 1, 1349, 0, '20110607 08:54:39', '3ea6c7cc-1247-4a5d-859d-dacfc54529c7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3472, N'update', 0, N'UPDATE Reporting_SavedGraph SET [SavedGraphSavedReportID] = @SavedGraphSavedReportID, [SavedGraphGUID] = @SavedGraphGUID, [SavedGraphBinary] = @SavedGraphBinary, [SavedGraphMimeType] = @SavedGraphMimeType, [SavedGraphLastModified] = @SavedGraphLastModified WHERE [SavedGraphID] = @SavedGraphID', 0, 1349, 0, '20110607 08:54:39', 'a3f2dc0e-9d33-46d8-b1bd-ff6467392869', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6992, N'delete', 0, N'DELETE FROM Forums_Attachment WHERE [AttachmentID] = @ID', 0, 1912, 0, '20110607 08:55:36', '25dc88fb-21f3-46ba-99e5-bf91efff8386', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6993, N'insert', 0, N'INSERT INTO Forums_Attachment ([AttachmentFileName], [AttachmentFileExtension], [AttachmentBinary], [AttachmentGUID], [AttachmentLastModified], [AttachmentMimeType], [AttachmentFileSize], [AttachmentImageHeight], [AttachmentImageWidth], [AttachmentPostID], [AttachmentSiteID] ) VALUES ( @AttachmentFileName, @AttachmentFileExtension, @AttachmentBinary, @AttachmentGUID, @AttachmentLastModified, @AttachmentMimeType, @AttachmentFileSize, @AttachmentImageHeight, @AttachmentImageWidth, @AttachmentPostID, @AttachmentSiteID); SELECT SCOPE_IDENTITY() AS [AttachmentID]', 1, 1912, 0, '20110607 08:55:36', '31325fb0-2377-4581-93c3-011633e36221', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6994, N'update', 0, N'UPDATE Forums_Attachment SET [AttachmentFileName] = @AttachmentFileName, [AttachmentFileExtension] = @AttachmentFileExtension, [AttachmentBinary] = @AttachmentBinary, [AttachmentGUID] = @AttachmentGUID, [AttachmentLastModified] = @AttachmentLastModified, [AttachmentMimeType] = @AttachmentMimeType, [AttachmentFileSize] = @AttachmentFileSize, [AttachmentImageHeight] = @AttachmentImageHeight, [AttachmentImageWidth] = @AttachmentImageWidth, [AttachmentPostID] = @AttachmentPostID, [AttachmentSiteID] = @AttachmentSiteID WHERE [AttachmentID] = @AttachmentID', 0, 1912, 0, '20110607 08:55:36', '8119dc5c-1250-46db-9804-018265ba099e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6476, N'delete', 0, N'DELETE FROM CMS_EmailAttachment WHERE [AttachmentID] = @ID', 0, 1790, 0, '20110607 08:55:51', 'd71846c7-e7d0-4755-8a3e-862983786d96', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6477, N'insert', 0, N'INSERT INTO CMS_EmailAttachment ([AttachmentName], [AttachmentExtension], [AttachmentSize], [AttachmentMimeType], [AttachmentBinary], [AttachmentGUID], [AttachmentLastModified], [AttachmentContentID], [AttachmentSiteID] ) VALUES ( @AttachmentName, @AttachmentExtension, @AttachmentSize, @AttachmentMimeType, @AttachmentBinary, @AttachmentGUID, @AttachmentLastModified, @AttachmentContentID, @AttachmentSiteID); SELECT SCOPE_IDENTITY() AS [AttachmentID]', 1, 1790, 0, '20110607 08:55:51', '9f913e2c-0005-4ea1-8abf-1379b976f657', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6478, N'update', 0, N'UPDATE CMS_EmailAttachment SET [AttachmentName] = @AttachmentName, [AttachmentExtension] = @AttachmentExtension, [AttachmentSize] = @AttachmentSize, [AttachmentMimeType] = @AttachmentMimeType, [AttachmentBinary] = @AttachmentBinary, [AttachmentGUID] = @AttachmentGUID, [AttachmentLastModified] = @AttachmentLastModified, [AttachmentContentID] = @AttachmentContentID, [AttachmentSiteID] = @AttachmentSiteID WHERE [AttachmentID] = @AttachmentID', 0, 1790, 0, '20110607 08:55:51', '202ec1ca-d4ff-4ed7-a02c-2cb5c3ef02c2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2467, N'delete', 0, N'DELETE FROM Forums_ForumGroup WHERE [GroupID] = @ID', 0, 1121, 0, '20110607 09:08:36', 'b937dc14-10f2-45b4-89d0-a012ffe5ef18', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2468, N'insert', 0, N'INSERT INTO Forums_ForumGroup ([GroupSiteID], [GroupName], [GroupDisplayName], [GroupOrder], [GroupDescription], [GroupGUID], [GroupLastModified], [GroupBaseUrl], [GroupUnsubscriptionUrl], [GroupGroupID], [GroupAuthorEdit], [GroupAuthorDelete], [GroupType], [GroupIsAnswerLimit], [GroupImageMaxSideSize], [GroupDisplayEmails], [GroupRequireEmail], [GroupHTMLEditor], [GroupUseCAPTCHA], [GroupAttachmentMaxFileSize], [GroupDiscussionActions], [GroupLogActivity] ) VALUES ( @GroupSiteID, @GroupName, @GroupDisplayName, @GroupOrder, @GroupDescription, @GroupGUID, @GroupLastModified, @GroupBaseUrl, @GroupUnsubscriptionUrl, @GroupGroupID, @GroupAuthorEdit, @GroupAuthorDelete, @GroupType, @GroupIsAnswerLimit, @GroupImageMaxSideSize, @GroupDisplayEmails, @GroupRequireEmail, @GroupHTMLEditor, @GroupUseCAPTCHA, @GroupAttachmentMaxFileSize, @GroupDiscussionActions, @GroupLogActivity); SELECT SCOPE_IDENTITY() AS [GroupID]', 1, 1121, 0, '20110607 09:08:36', '39754a5a-b47c-4dbe-8757-6b7195e2eea2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2469, N'update', 0, N'UPDATE Forums_ForumGroup SET [GroupSiteID] = @GroupSiteID, [GroupName] = @GroupName, [GroupDisplayName] = @GroupDisplayName, [GroupOrder] = @GroupOrder, [GroupDescription] = @GroupDescription, [GroupGUID] = @GroupGUID, [GroupLastModified] = @GroupLastModified, [GroupBaseUrl] = @GroupBaseUrl, [GroupUnsubscriptionUrl] = @GroupUnsubscriptionUrl, [GroupGroupID] = @GroupGroupID, [GroupAuthorEdit] = @GroupAuthorEdit, [GroupAuthorDelete] = @GroupAuthorDelete, [GroupType] = @GroupType, [GroupIsAnswerLimit] = @GroupIsAnswerLimit, [GroupImageMaxSideSize] = @GroupImageMaxSideSize, [GroupDisplayEmails] = @GroupDisplayEmails, [GroupRequireEmail] = @GroupRequireEmail, [GroupHTMLEditor] = @GroupHTMLEditor, [GroupUseCAPTCHA] = @GroupUseCAPTCHA, [GroupAttachmentMaxFileSize] = @GroupAttachmentMaxFileSize, [GroupDiscussionActions] = @GroupDiscussionActions, [GroupLogActivity] = @GroupLogActivity WHERE [GroupID] = @GroupID', 0, 1121, 0, '20110607 09:08:36', '9d7e47b3-48e8-4820-9a8a-5cb4355a1a63', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2566, N'update', 0, N'UPDATE Staging_Synclog SET [SyncLogTaskID] = @SyncLogTaskID, [SyncLogServerID] = @SyncLogServerID, [SyncLogTime] = @SyncLogTime, [SyncLogError] = @SyncLogError WHERE [SyncLogID] = @SyncLogID', 0, 1133, 0, '20110613 10:44:25', '34473118-b18d-4f9e-92db-8efe98f094d2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1277, N'delete', 0, N'DELETE FROM CMS_Form WHERE [FormID] = @ID', 0, 880, 0, '20110628 12:30:53', '8f8d59c4-953b-432e-ac3a-cd574451366a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1278, N'insert', 0, N'INSERT INTO CMS_Form ([FormDisplayName], [FormName], [FormSendToEmail], [FormSendFromEmail], [FormEmailSubject], [FormEmailTemplate], [FormEmailAttachUploadedDocs], [FormClassID], [FormItems], [FormReportFields], [FormRedirectToUrl], [FormDisplayText], [FormClearAfterSave], [FormSubmitButtonText], [FormSiteID], [FormConfirmationEmailField], [FormConfirmationTemplate], [FormConfirmationSendFromEmail], [FormConfirmationEmailSubject], [FormAccess], [FormSubmitButtonImage], [FormGUID], [FormLastModified], [FormLogActivity] ) VALUES ( @FormDisplayName, @FormName, @FormSendToEmail, @FormSendFromEmail, @FormEmailSubject, @FormEmailTemplate, @FormEmailAttachUploadedDocs, @FormClassID, @FormItems, @FormReportFields, @FormRedirectToUrl, @FormDisplayText, @FormClearAfterSave, @FormSubmitButtonText, @FormSiteID, @FormConfirmationEmailField, @FormConfirmationTemplate, @FormConfirmationSendFromEmail, @FormConfirmationEmailSubject, @FormAccess, @FormSubmitButtonImage, @FormGUID, @FormLastModified, @FormLogActivity); SELECT SCOPE_IDENTITY() AS [FormID]', 1, 880, 0, '20110628 12:30:53', 'fad90dd7-8e13-4010-a2a0-b315dffe1375', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1279, N'update', 0, N'UPDATE CMS_Form SET [FormDisplayName] = @FormDisplayName, [FormName] = @FormName, [FormSendToEmail] = @FormSendToEmail, [FormSendFromEmail] = @FormSendFromEmail, [FormEmailSubject] = @FormEmailSubject, [FormEmailTemplate] = @FormEmailTemplate, [FormEmailAttachUploadedDocs] = @FormEmailAttachUploadedDocs, [FormClassID] = @FormClassID, [FormItems] = @FormItems, [FormReportFields] = @FormReportFields, [FormRedirectToUrl] = @FormRedirectToUrl, [FormDisplayText] = @FormDisplayText, [FormClearAfterSave] = @FormClearAfterSave, [FormSubmitButtonText] = @FormSubmitButtonText, [FormSiteID] = @FormSiteID, [FormConfirmationEmailField] = @FormConfirmationEmailField, [FormConfirmationTemplate] = @FormConfirmationTemplate, [FormConfirmationSendFromEmail] = @FormConfirmationSendFromEmail, [FormConfirmationEmailSubject] = @FormConfirmationEmailSubject, [FormAccess] = @FormAccess, [FormSubmitButtonImage] = @FormSubmitButtonImage, [FormGUID] = @FormGUID, [FormLastModified] = @FormLastModified, [FormLogActivity] = @FormLogActivity WHERE [FormID] = @FormID', 0, 880, 0, '20110628 12:30:53', 'b8e88096-8976-4906-a1c0-d3f5e5a19076', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (283, N'delete', 0, N'DELETE FROM CMS_PageTemplate WHERE [PageTemplateID] = @ID', 0, 157, 0, '20110714 08:18:30', 'dce8abb3-6afe-407f-80ca-c2a0cca24bcc', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (278, N'insert', 0, N'INSERT INTO CMS_PageTemplate ([PageTemplateDisplayName], [PageTemplateCodeName], [PageTemplateDescription], [PageTemplateIsPortal], [PageTemplateCategoryID], [PageTemplateLayoutID], [PageTemplateWebParts], [PageTemplateIsReusable], [PageTemplateShowAsMasterTemplate], [PageTemplateInheritPageLevels], [PageTemplateLayout], [PageTemplateLayoutCheckedOutFileName], [PageTemplateLayoutCheckedOutByUserID], [PageTemplateLayoutCheckedOutMachineName], [PageTemplateVersionGUID], [PageTemplateHeader], [PageTemplateGUID], [PageTemplateLastModified], [PageTemplateSiteID], [PageTemplateForAllPages], [PageTemplateType], [PageTemplateLayoutType], [PageTemplateCSS], [PageTemplateFile] ) VALUES ( @PageTemplateDisplayName, @PageTemplateCodeName, @PageTemplateDescription, @PageTemplateIsPortal, @PageTemplateCategoryID, @PageTemplateLayoutID, @PageTemplateWebParts, @PageTemplateIsReusable, @PageTemplateShowAsMasterTemplate, @PageTemplateInheritPageLevels, @PageTemplateLayout, @PageTemplateLayoutCheckedOutFileName, @PageTemplateLayoutCheckedOutByUserID, @PageTemplateLayoutCheckedOutMachineName, @PageTemplateVersionGUID, @PageTemplateHeader, @PageTemplateGUID, @PageTemplateLastModified, @PageTemplateSiteID, @PageTemplateForAllPages, @PageTemplateType, @PageTemplateLayoutType, @PageTemplateCSS, @PageTemplateFile); SELECT SCOPE_IDENTITY() AS [PageTemplateID]', 1, 157, 0, '20110714 08:18:30', '803957ed-bcc3-4fcd-bdee-e0e0847a8422', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (277, N'update', 0, N'UPDATE CMS_PageTemplate SET [PageTemplateDisplayName] = @PageTemplateDisplayName, [PageTemplateCodeName] = @PageTemplateCodeName, [PageTemplateDescription] = @PageTemplateDescription, [PageTemplateIsPortal] = @PageTemplateIsPortal, [PageTemplateCategoryID] = @PageTemplateCategoryID, [PageTemplateLayoutID] = @PageTemplateLayoutID, [PageTemplateWebParts] = @PageTemplateWebParts, [PageTemplateIsReusable] = @PageTemplateIsReusable, [PageTemplateShowAsMasterTemplate] = @PageTemplateShowAsMasterTemplate, [PageTemplateInheritPageLevels] = @PageTemplateInheritPageLevels, [PageTemplateLayout] = @PageTemplateLayout, [PageTemplateLayoutCheckedOutFileName] = @PageTemplateLayoutCheckedOutFileName, [PageTemplateLayoutCheckedOutByUserID] = @PageTemplateLayoutCheckedOutByUserID, [PageTemplateLayoutCheckedOutMachineName] = @PageTemplateLayoutCheckedOutMachineName, [PageTemplateVersionGUID] = @PageTemplateVersionGUID, [PageTemplateHeader] = @PageTemplateHeader, [PageTemplateGUID] = @PageTemplateGUID, [PageTemplateLastModified] = @PageTemplateLastModified, [PageTemplateSiteID] = @PageTemplateSiteID, [PageTemplateForAllPages] = @PageTemplateForAllPages, [PageTemplateType] = @PageTemplateType, [PageTemplateLayoutType] = @PageTemplateLayoutType, [PageTemplateCSS] = @PageTemplateCSS, [PageTemplateFile] = @PageTemplateFile WHERE [PageTemplateID] = @PageTemplateID', 0, 157, 0, '20110714 08:18:30', '159bbc1c-ebeb-44e2-9222-afce8104eb80', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (160, N'delete', 0, N'DELETE FROM CMS_EmailTemplate WHERE [EmailTemplateID] = @ID', 0, 129, 0, '20110715 15:54:13', '4dccc48e-2e98-47fb-8bb3-964b8407c2c8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (162, N'insert', 0, N'INSERT INTO CMS_EmailTemplate ([EmailTemplateName], [EmailTemplateDisplayName], [EmailTemplateText], [EmailTemplateSiteID], [EmailTemplateGUID], [EmailTemplateLastModified], [EmailTemplatePlainText], [EmailTemplateSubject], [EmailTemplateFrom], [EmailTemplateCc], [EmailTemplateBcc], [EmailTemplateType] ) VALUES ( @EmailTemplateName, @EmailTemplateDisplayName, @EmailTemplateText, @EmailTemplateSiteID, @EmailTemplateGUID, @EmailTemplateLastModified, @EmailTemplatePlainText, @EmailTemplateSubject, @EmailTemplateFrom, @EmailTemplateCc, @EmailTemplateBcc, @EmailTemplateType); SELECT SCOPE_IDENTITY() AS [EmailTemplateID]', 1, 129, 0, '20110715 15:54:13', '8d128097-e776-46a7-bac1-94dcbf8e9066', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (161, N'update', 0, N'UPDATE CMS_EmailTemplate SET [EmailTemplateName] = @EmailTemplateName, [EmailTemplateDisplayName] = @EmailTemplateDisplayName, [EmailTemplateText] = @EmailTemplateText, [EmailTemplateSiteID] = @EmailTemplateSiteID, [EmailTemplateGUID] = @EmailTemplateGUID, [EmailTemplateLastModified] = @EmailTemplateLastModified, [EmailTemplatePlainText] = @EmailTemplatePlainText, [EmailTemplateSubject] = @EmailTemplateSubject, [EmailTemplateFrom] = @EmailTemplateFrom, [EmailTemplateCc] = @EmailTemplateCc, [EmailTemplateBcc] = @EmailTemplateBcc, [EmailTemplateType] = @EmailTemplateType WHERE [EmailTemplateID] = @EmailTemplateID', 0, 129, 0, '20110715 15:54:13', '8480a424-b73a-453d-8771-b71efa4b3834', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5787, N'delete', 0, N'DELETE FROM CONTENT_File WHERE [FileID] = @ID', 0, 1685, 0, '20110719 11:31:15', '829cac72-4223-4725-8f86-221bcd2265a1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5789, N'update', 0, N'UPDATE CONTENT_File SET [FileDescription] = @FileDescription, [FileName] = @FileName, [FileAttachment] = @FileAttachment WHERE [FileID] = @FileID', 0, 1685, 0, '20110719 11:31:15', '2b2728c1-4fb8-4253-926a-078fd247f23d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5790, N'searchtree', 0, N'SELECT ##COLUMNS##, View_CONTENT_File_Joined.DocumentName AS SearchResultName FROM View_CONTENT_File_Joined WHERE (##WHERE##) AND ([FileDescription] Like N''%''+ @Expression + N''%'' OR [FileName] Like N''%''+ @Expression + N''%'')  ORDER BY ##ORDERBY##', 0, 1685, 0, '20110719 11:31:15', '1a5e8e05-3a8d-4aea-9af5-308a8de67583', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (5788, N'insert', 0, N'INSERT INTO CONTENT_File ([FileDescription], [FileName], [FileAttachment] ) VALUES ( @FileDescription, @FileName, @FileAttachment); SELECT SCOPE_IDENTITY() AS [FileID]', 1, 1685, 0, '20110719 12:08:14', '66780bbf-96dd-46b2-8e30-94054247643b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3285, N'delete', 0, N'DELETE FROM Newsletter_SubscriberNewsletter WHERE [SubscriberID] = @SubscriberID AND [NewsletterID] = @NewsletterID', 0, 912, 0, '20110727 10:05:41', '7a8855e8-cb69-49f2-b34b-c96da1cbdaa1', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3286, N'insert', 0, N'INSERT INTO Newsletter_SubscriberNewsletter ([SubscriberID], [NewsletterID], [SubscribedWhen], [SubscriptionApproved], [SubscriptionApprovedWhen], [SubscriptionApprovalHash] ) VALUES ( @SubscriberID, @NewsletterID, @SubscribedWhen, @SubscriptionApproved, @SubscriptionApprovedWhen, @SubscriptionApprovalHash);', 1, 912, 0, '20110727 10:05:41', '2afb9eec-5f3b-4814-a957-c0d33d631247', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3287, N'update', 0, N'UPDATE Newsletter_SubscriberNewsletter SET [SubscribedWhen] = @SubscribedWhen, [SubscriptionApproved] = @SubscriptionApproved, [SubscriptionApprovedWhen] = @SubscriptionApprovedWhen, [SubscriptionApprovalHash] = @SubscriptionApprovalHash WHERE [SubscriberID] = @SubscriberID AND [NewsletterID] = @NewsletterID', 0, 912, 0, '20110727 10:05:41', '225701a6-5a34-4ef8-8274-d8c074a54aea', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2186, N'delete', 0, N'DELETE FROM CMS_WebFarmTask WHERE [TaskID] = @ID', 0, 1094, 0, '20110727 15:53:52', 'd4f841c1-ddc2-4864-8c28-ca260e069466', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2187, N'insert', 0, N'INSERT INTO CMS_WebFarmTask ([TaskType], [TaskTextData], [TaskBinaryData], [TaskCreated], [TaskEnabled], [TaskTarget], [TaskMachineName], [TaskGUID], [TaskIsAnonymous], [TaskErrorMessage] ) VALUES ( @TaskType, @TaskTextData, @TaskBinaryData, @TaskCreated, @TaskEnabled, @TaskTarget, @TaskMachineName, @TaskGUID, @TaskIsAnonymous, @TaskErrorMessage); SELECT SCOPE_IDENTITY() AS [TaskID]', 1, 1094, 0, '20110727 15:53:52', '65f4dfb9-e780-43de-ad99-3ae10a766d46', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2188, N'update', 0, N'UPDATE CMS_WebFarmTask SET [TaskType] = @TaskType, [TaskTextData] = @TaskTextData, [TaskBinaryData] = @TaskBinaryData, [TaskCreated] = @TaskCreated, [TaskEnabled] = @TaskEnabled, [TaskTarget] = @TaskTarget, [TaskMachineName] = @TaskMachineName, [TaskGUID] = @TaskGUID, [TaskIsAnonymous] = @TaskIsAnonymous, [TaskErrorMessage] = @TaskErrorMessage WHERE [TaskID] = @TaskID', 0, 1094, 0, '20110727 15:53:52', '2aa52eba-2ba9-49a6-96f0-98faac65d534', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2768, N'delete', 0, N'DELETE FROM COM_Order WHERE [OrderID] = @ID', 0, 1158, 0, '20110729 12:29:26', '0ad25a88-4412-4dc0-a968-e9633824dbb8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2769, N'insert', 0, N'INSERT INTO COM_Order ([OrderBillingAddressID], [OrderShippingAddressID], [OrderShippingOptionID], [OrderTotalShipping], [OrderTotalPrice], [OrderTotalTax], [OrderDate], [OrderStatusID], [OrderCurrencyID], [OrderCustomerID], [OrderCreatedByUserID], [OrderNote], [OrderSiteID], [OrderPaymentOptionID], [OrderInvoice], [OrderInvoiceNumber], [OrderDiscountCouponID], [OrderCompanyAddressID], [OrderTrackingNumber], [OrderCustomData], [OrderPaymentResult], [OrderGUID], [OrderLastModified], [OrderTotalPriceInMainCurrency], [OrderIsPaid], [OrderCulture] ) VALUES ( @OrderBillingAddressID, @OrderShippingAddressID, @OrderShippingOptionID, @OrderTotalShipping, @OrderTotalPrice, @OrderTotalTax, @OrderDate, @OrderStatusID, @OrderCurrencyID, @OrderCustomerID, @OrderCreatedByUserID, @OrderNote, @OrderSiteID, @OrderPaymentOptionID, @OrderInvoice, @OrderInvoiceNumber, @OrderDiscountCouponID, @OrderCompanyAddressID, @OrderTrackingNumber, @OrderCustomData, @OrderPaymentResult, @OrderGUID, @OrderLastModified, @OrderTotalPriceInMainCurrency, @OrderIsPaid, @OrderCulture); SELECT SCOPE_IDENTITY() AS [OrderID]', 1, 1158, 0, '20110729 12:29:27', '223776d7-f519-4678-97f5-556af35be2d2', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2770, N'update', 0, N'UPDATE COM_Order SET [OrderBillingAddressID] = @OrderBillingAddressID, [OrderShippingAddressID] = @OrderShippingAddressID, [OrderShippingOptionID] = @OrderShippingOptionID, [OrderTotalShipping] = @OrderTotalShipping, [OrderTotalPrice] = @OrderTotalPrice, [OrderTotalTax] = @OrderTotalTax, [OrderDate] = @OrderDate, [OrderStatusID] = @OrderStatusID, [OrderCurrencyID] = @OrderCurrencyID, [OrderCustomerID] = @OrderCustomerID, [OrderCreatedByUserID] = @OrderCreatedByUserID, [OrderNote] = @OrderNote, [OrderSiteID] = @OrderSiteID, [OrderPaymentOptionID] = @OrderPaymentOptionID, [OrderInvoice] = @OrderInvoice, [OrderInvoiceNumber] = @OrderInvoiceNumber, [OrderDiscountCouponID] = @OrderDiscountCouponID, [OrderCompanyAddressID] = @OrderCompanyAddressID, [OrderTrackingNumber] = @OrderTrackingNumber, [OrderCustomData] = @OrderCustomData, [OrderPaymentResult] = @OrderPaymentResult, [OrderGUID] = @OrderGUID, [OrderLastModified] = @OrderLastModified, [OrderTotalPriceInMainCurrency] = @OrderTotalPriceInMainCurrency, [OrderIsPaid] = @OrderIsPaid, [OrderCulture] = @OrderCulture WHERE [OrderID] = @OrderID', 0, 1158, 0, '20110729 12:29:27', '841697e3-1857-41da-be94-106f750f6da8', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1320, N'delete', 0, N'DELETE FROM CMS_ScheduledTask WHERE [TaskID] = @ID', 0, 909, 0, '20110801 18:03:09', 'c31b080a-066c-4565-953a-691bab184af4', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1321, N'insert', 0, N'INSERT INTO CMS_ScheduledTask ([TaskName], [TaskDisplayName], [TaskAssemblyName], [TaskClass], [TaskInterval], [TaskData], [TaskLastRunTime], [TaskNextRunTime], [TaskProgress], [TaskLastResult], [TaskEnabled], [TaskSiteID], [TaskDeleteAfterLastRun], [TaskServerName], [TaskGUID], [TaskLastModified], [TaskExecutions], [TaskResourceID], [TaskRunInSeparateThread], [TaskUseExternalService], [TaskAllowExternalService] ) VALUES ( @TaskName, @TaskDisplayName, @TaskAssemblyName, @TaskClass, @TaskInterval, @TaskData, @TaskLastRunTime, @TaskNextRunTime, @TaskProgress, @TaskLastResult, @TaskEnabled, @TaskSiteID, @TaskDeleteAfterLastRun, @TaskServerName, @TaskGUID, @TaskLastModified, @TaskExecutions, @TaskResourceID, @TaskRunInSeparateThread, @TaskUseExternalService, @TaskAllowExternalService); SELECT SCOPE_IDENTITY() AS [TaskID]', 1, 909, 0, '20110801 18:03:10', '652aa7db-c886-4774-89c7-0309ccbc00c7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1322, N'update', 0, N'UPDATE CMS_ScheduledTask SET [TaskName] = @TaskName, [TaskDisplayName] = @TaskDisplayName, [TaskAssemblyName] = @TaskAssemblyName, [TaskClass] = @TaskClass, [TaskInterval] = @TaskInterval, [TaskData] = @TaskData, [TaskLastRunTime] = @TaskLastRunTime, [TaskNextRunTime] = @TaskNextRunTime, [TaskProgress] = @TaskProgress, [TaskLastResult] = @TaskLastResult, [TaskEnabled] = @TaskEnabled, [TaskSiteID] = @TaskSiteID, [TaskDeleteAfterLastRun] = @TaskDeleteAfterLastRun, [TaskServerName] = @TaskServerName, [TaskGUID] = @TaskGUID, [TaskLastModified] = @TaskLastModified, [TaskExecutions] = @TaskExecutions, [TaskResourceID] = @TaskResourceID, [TaskRunInSeparateThread] = @TaskRunInSeparateThread, [TaskUseExternalService] = @TaskUseExternalService, [TaskAllowExternalService] = @TaskAllowExternalService WHERE [TaskID] = @TaskID', 0, 909, 0, '20110801 18:03:10', '6adb4378-0beb-46f5-b1b7-b1c82f180494', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (454, N'getuserswhocanapprove', 0, N'SELECT ##TOPN## ##COLUMNS## FROM CMS_User WHERE UserID IN (SELECT UserID FROM [View_CMS_UserRoleMembershipRole]  WHERE 
(ValidTo IS NULL OR ValidTo > @Now) AND RoleID IN (
SELECT RoleID FROM CMS_WorkflowStepRoles WHERE (StepID = @StepID)) AND RoleID IN 
(SELECT RoleID FROM CMS_Role WHERE (SiteID = @SiteID OR SiteID IS NULL)) AND (##WHERE##))
 ORDER BY ##ORDERBY##', 0, 172, 0, '20110810 10:25:49', 'f5a12937-2946-455c-88ca-02858c795e76', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6252, N'delete', 0, N'DELETE FROM Community_Group WHERE [GroupID] = @ID', 0, 1748, 0, '20110811 09:35:36', '8692e6f4-2aeb-4823-b830-e677cda462e9', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6253, N'insert', 0, N'INSERT INTO Community_Group ([GroupGUID], [GroupLastModified], [GroupSiteID], [GroupDisplayName], [GroupName], [GroupDescription], [GroupNodeGUID], [GroupApproveMembers], [GroupAccess], [GroupCreatedByUserID], [GroupApprovedByUserID], [GroupAvatarID], [GroupApproved], [GroupCreatedWhen], [GroupSendJoinLeaveNotification], [GroupSendWaitingForApprovalNotification], [GroupSecurity], [GroupLogActivity] ) VALUES ( @GroupGUID, @GroupLastModified, @GroupSiteID, @GroupDisplayName, @GroupName, @GroupDescription, @GroupNodeGUID, @GroupApproveMembers, @GroupAccess, @GroupCreatedByUserID, @GroupApprovedByUserID, @GroupAvatarID, @GroupApproved, @GroupCreatedWhen, @GroupSendJoinLeaveNotification, @GroupSendWaitingForApprovalNotification, @GroupSecurity, @GroupLogActivity); SELECT SCOPE_IDENTITY() AS [GroupID]', 1, 1748, 0, '20110811 09:35:36', '800681ba-cfa0-497e-a945-7f0794e730df', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6254, N'update', 0, N'UPDATE Community_Group SET [GroupGUID] = @GroupGUID, [GroupLastModified] = @GroupLastModified, [GroupSiteID] = @GroupSiteID, [GroupDisplayName] = @GroupDisplayName, [GroupName] = @GroupName, [GroupDescription] = @GroupDescription, [GroupNodeGUID] = @GroupNodeGUID, [GroupApproveMembers] = @GroupApproveMembers, [GroupAccess] = @GroupAccess, [GroupCreatedByUserID] = @GroupCreatedByUserID, [GroupApprovedByUserID] = @GroupApprovedByUserID, [GroupAvatarID] = @GroupAvatarID, [GroupApproved] = @GroupApproved, [GroupCreatedWhen] = @GroupCreatedWhen, [GroupSendJoinLeaveNotification] = @GroupSendJoinLeaveNotification, [GroupSendWaitingForApprovalNotification] = @GroupSendWaitingForApprovalNotification, [GroupSecurity] = @GroupSecurity, [GroupLogActivity] = @GroupLogActivity WHERE [GroupID] = @GroupID', 0, 1748, 0, '20110811 09:35:36', '605efbd0-a0d8-4106-ad69-9a5974763590', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2491, N'delete', 0, N'DELETE FROM cms_country WHERE [CountryID] = @ID', 0, 1125, 0, '20110811 13:58:56', '4962775e-b366-4a37-8fa8-4719ff7a4503', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2492, N'insert', 0, N'INSERT INTO cms_country ([CountryDisplayName], [CountryName], [CountryGUID], [CountryLastModified] ) VALUES ( @CountryDisplayName, @CountryName, @CountryGUID, @CountryLastModified); SELECT SCOPE_IDENTITY() AS [CountryID]', 1, 1125, 0, '20110811 13:58:56', '25e3f427-4841-4401-9b1b-1e4c84681f07', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2493, N'update', 0, N'UPDATE cms_country SET [CountryDisplayName] = @CountryDisplayName, [CountryName] = @CountryName, [CountryGUID] = @CountryGUID, [CountryLastModified] = @CountryLastModified WHERE [CountryID] = @CountryID', 0, 1125, 0, '20110811 13:58:56', 'fec40a13-b8d2-433f-bc12-e80ed3c39457', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2511, N'delete', 0, N'DELETE FROM CMS_State WHERE [StateID] = @ID', 0, 1126, 0, '20110811 13:59:08', '7b9790cd-24f0-40f0-afec-8718e9c5db5c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2512, N'insert', 0, N'INSERT INTO CMS_State ([StateDisplayName], [StateName], [StateCode], [CountryID], [StateGUID], [StateLastModified] ) VALUES ( @StateDisplayName, @StateName, @StateCode, @CountryID, @StateGUID, @StateLastModified); SELECT SCOPE_IDENTITY() AS [StateID]', 1, 1126, 0, '20110811 13:59:08', '95624f9e-6e75-48e0-85d9-423ef73d427f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2513, N'update', 0, N'UPDATE CMS_State SET [StateDisplayName] = @StateDisplayName, [StateName] = @StateName, [StateCode] = @StateCode, [CountryID] = @CountryID, [StateGUID] = @StateGUID, [StateLastModified] = @StateLastModified WHERE [StateID] = @StateID', 0, 1126, 0, '20110811 13:59:08', 'a01c7fb9-a8f8-4a71-a410-ae9329af2f77', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4767, N'delete', 0, N'DELETE FROM COM_ShoppingCartSKU WHERE [CartItemID] = @ID', 0, 1606, 0, '20110812 15:34:17', 'e6298a85-2cf5-4bc2-ad5c-d5996f36dff7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4768, N'insert', 0, N'INSERT INTO COM_ShoppingCartSKU ([ShoppingCartID], [SKUID], [SKUUnits], [CartItemCustomData], [CartItemGuid], [CartItemParentGuid], [CartItemPrice], [CartItemIsPrivate], [CartItemValidTo], [CartItemBundleGUID], [CartItemText] ) VALUES ( @ShoppingCartID, @SKUID, @SKUUnits, @CartItemCustomData, @CartItemGuid, @CartItemParentGuid, @CartItemPrice, @CartItemIsPrivate, @CartItemValidTo, @CartItemBundleGUID, @CartItemText); SELECT SCOPE_IDENTITY() AS [CartItemID]', 1, 1606, 0, '20110812 15:34:17', '97c481d1-5bb2-423d-b29f-d0f3e67e1f3c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4769, N'update', 0, N'UPDATE COM_ShoppingCartSKU SET [ShoppingCartID] = @ShoppingCartID, [SKUID] = @SKUID, [SKUUnits] = @SKUUnits, [CartItemCustomData] = @CartItemCustomData, [CartItemGuid] = @CartItemGuid, [CartItemParentGuid] = @CartItemParentGuid, [CartItemPrice] = @CartItemPrice, [CartItemIsPrivate] = @CartItemIsPrivate, [CartItemValidTo] = @CartItemValidTo, [CartItemBundleGUID] = @CartItemBundleGUID, [CartItemText] = @CartItemText WHERE [CartItemID] = @CartItemID', 0, 1606, 0, '20110812 15:34:17', 'e8c7c21e-5d9d-481d-856d-022c2b334165', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2803, N'delete', 0, N'DELETE FROM COM_OrderItem WHERE [OrderItemID] = @ID', 0, 1161, 0, '20110815 14:51:20', 'e8364c2a-9a37-497f-bd1c-646110ed6166', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2804, N'insert', 0, N'INSERT INTO COM_OrderItem ([OrderItemOrderID], [OrderItemSKUID], [OrderItemSKUName], [OrderItemUnitPrice], [OrderItemUnitCount], [OrderItemCustomData], [OrderItemGuid], [OrderItemParentGuid], [OrderItemLastModified], [OrderItemIsPrivate], [OrderItemSKU], [OrderItemValidTo], [OrderItemBundleGUID], [OrderItemTotalPriceInMainCurrency], [OrderItemSendNotification], [OrderItemText], [OrderItemPrice] ) VALUES ( @OrderItemOrderID, @OrderItemSKUID, @OrderItemSKUName, @OrderItemUnitPrice, @OrderItemUnitCount, @OrderItemCustomData, @OrderItemGuid, @OrderItemParentGuid, @OrderItemLastModified, @OrderItemIsPrivate, @OrderItemSKU, @OrderItemValidTo, @OrderItemBundleGUID, @OrderItemTotalPriceInMainCurrency, @OrderItemSendNotification, @OrderItemText, @OrderItemPrice); SELECT SCOPE_IDENTITY() AS [OrderItemID]', 1, 1161, 0, '20110815 14:51:20', 'f2064744-c6f3-433d-8baa-10f7a789919b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2805, N'update', 0, N'UPDATE COM_OrderItem SET [OrderItemOrderID] = @OrderItemOrderID, [OrderItemSKUID] = @OrderItemSKUID, [OrderItemSKUName] = @OrderItemSKUName, [OrderItemUnitPrice] = @OrderItemUnitPrice, [OrderItemUnitCount] = @OrderItemUnitCount, [OrderItemCustomData] = @OrderItemCustomData, [OrderItemGuid] = @OrderItemGuid, [OrderItemParentGuid] = @OrderItemParentGuid, [OrderItemLastModified] = @OrderItemLastModified, [OrderItemIsPrivate] = @OrderItemIsPrivate, [OrderItemSKU] = @OrderItemSKU, [OrderItemValidTo] = @OrderItemValidTo, [OrderItemBundleGUID] = @OrderItemBundleGUID, [OrderItemTotalPriceInMainCurrency] = @OrderItemTotalPriceInMainCurrency, [OrderItemSendNotification] = @OrderItemSendNotification, [OrderItemText] = @OrderItemText, [OrderItemPrice] = @OrderItemPrice WHERE [OrderItemID] = @OrderItemID', 0, 1161, 0, '20110815 14:51:20', '958d032b-a4f0-4aef-b7e5-42c8507fd526', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1315, N'delete', 0, N'DELETE FROM Newsletter_Subscriber WHERE [SubscriberID] = @ID', 0, 908, 0, '20110816 10:35:35', '210492d8-a348-4b75-b294-ea482c4a466c', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1316, N'insert', 0, N'INSERT INTO Newsletter_Subscriber ([SubscriberEmail], [SubscriberFirstName], [SubscriberLastName], [SubscriberSiteID], [SubscriberGUID], [SubscriberCustomData], [SubscriberType], [SubscriberRelatedID], [SubscriberLastModified], [SubscriberFullName], [SubscriberBounces] ) VALUES ( @SubscriberEmail, @SubscriberFirstName, @SubscriberLastName, @SubscriberSiteID, @SubscriberGUID, @SubscriberCustomData, @SubscriberType, @SubscriberRelatedID, @SubscriberLastModified, @SubscriberFullName, @SubscriberBounces); SELECT SCOPE_IDENTITY() AS [SubscriberID]', 1, 908, 0, '20110816 10:35:35', 'aa2e09e3-5741-4a7b-9b34-85b4a1db3cf6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (1317, N'update', 0, N'UPDATE Newsletter_Subscriber SET [SubscriberEmail] = @SubscriberEmail, [SubscriberFirstName] = @SubscriberFirstName, [SubscriberLastName] = @SubscriberLastName, [SubscriberSiteID] = @SubscriberSiteID, [SubscriberGUID] = @SubscriberGUID, [SubscriberCustomData] = @SubscriberCustomData, [SubscriberType] = @SubscriberType, [SubscriberRelatedID] = @SubscriberRelatedID, [SubscriberLastModified] = @SubscriberLastModified, [SubscriberFullName] = @SubscriberFullName, [SubscriberBounces] = @SubscriberBounces WHERE [SubscriberID] = @SubscriberID', 0, 908, 0, '20110816 10:35:35', '90fd45b2-c1ab-44ad-9b4d-b2b8a2438521', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2774, N'delete', 0, N'DELETE FROM COM_SKU WHERE [SKUID] = @ID', 0, 1159, 0, '20110816 13:07:10', 'c9d243c7-4abe-496e-b8d7-273a4c406138', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2775, N'insert', 0, N'INSERT INTO COM_SKU ([SKUNumber], [SKUName], [SKUDescription], [SKUPrice], [SKUEnabled], [SKUDepartmentID], [SKUManufacturerID], [SKUInternalStatusID], [SKUPublicStatusID], [SKUSupplierID], [SKUAvailableInDays], [SKUGUID], [SKUImagePath], [SKUWeight], [SKUWidth], [SKUDepth], [SKUHeight], [SKUAvailableItems], [SKUSellOnlyAvailable], [SKUCustomData], [SKUOptionCategoryID], [SKUOrder], [SKULastModified], [SKUCreated], [SKUSiteID], [SKUPrivateDonation], [SKUNeedsShipping], [SKUMaxDownloads], [SKUValidUntil], [SKUProductType], [SKUMaxItemsInOrder], [SKUMaxPrice], [SKUValidity], [SKUValidFor], [SKUMinPrice], [SKUMembershipGUID], [SKUConversionName], [SKUConversionValue], [SKUBundleInventoryType] ) VALUES ( @SKUNumber, @SKUName, @SKUDescription, @SKUPrice, @SKUEnabled, @SKUDepartmentID, @SKUManufacturerID, @SKUInternalStatusID, @SKUPublicStatusID, @SKUSupplierID, @SKUAvailableInDays, @SKUGUID, @SKUImagePath, @SKUWeight, @SKUWidth, @SKUDepth, @SKUHeight, @SKUAvailableItems, @SKUSellOnlyAvailable, @SKUCustomData, @SKUOptionCategoryID, @SKUOrder, @SKULastModified, @SKUCreated, @SKUSiteID, @SKUPrivateDonation, @SKUNeedsShipping, @SKUMaxDownloads, @SKUValidUntil, @SKUProductType, @SKUMaxItemsInOrder, @SKUMaxPrice, @SKUValidity, @SKUValidFor, @SKUMinPrice, @SKUMembershipGUID, @SKUConversionName, @SKUConversionValue, @SKUBundleInventoryType); SELECT SCOPE_IDENTITY() AS [SKUID]', 1, 1159, 0, '20110816 13:07:10', '8db7d269-4e19-400d-8676-202439db222f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2776, N'update', 0, N'UPDATE COM_SKU SET [SKUNumber] = @SKUNumber, [SKUName] = @SKUName, [SKUDescription] = @SKUDescription, [SKUPrice] = @SKUPrice, [SKUEnabled] = @SKUEnabled, [SKUDepartmentID] = @SKUDepartmentID, [SKUManufacturerID] = @SKUManufacturerID, [SKUInternalStatusID] = @SKUInternalStatusID, [SKUPublicStatusID] = @SKUPublicStatusID, [SKUSupplierID] = @SKUSupplierID, [SKUAvailableInDays] = @SKUAvailableInDays, [SKUGUID] = @SKUGUID, [SKUImagePath] = @SKUImagePath, [SKUWeight] = @SKUWeight, [SKUWidth] = @SKUWidth, [SKUDepth] = @SKUDepth, [SKUHeight] = @SKUHeight, [SKUAvailableItems] = @SKUAvailableItems, [SKUSellOnlyAvailable] = @SKUSellOnlyAvailable, [SKUCustomData] = @SKUCustomData, [SKUOptionCategoryID] = @SKUOptionCategoryID, [SKUOrder] = @SKUOrder, [SKULastModified] = @SKULastModified, [SKUCreated] = @SKUCreated, [SKUSiteID] = @SKUSiteID, [SKUPrivateDonation] = @SKUPrivateDonation, [SKUNeedsShipping] = @SKUNeedsShipping, [SKUMaxDownloads] = @SKUMaxDownloads, [SKUValidUntil] = @SKUValidUntil, [SKUProductType] = @SKUProductType, [SKUMaxItemsInOrder] = @SKUMaxItemsInOrder, [SKUMaxPrice] = @SKUMaxPrice, [SKUValidity] = @SKUValidity, [SKUValidFor] = @SKUValidFor, [SKUMinPrice] = @SKUMinPrice, [SKUMembershipGUID] = @SKUMembershipGUID, [SKUConversionName] = @SKUConversionName, [SKUConversionValue] = @SKUConversionValue, [SKUBundleInventoryType] = @SKUBundleInventoryType WHERE [SKUID] = @SKUID', 0, 1159, 0, '20110816 13:07:10', 'ff13f892-ed34-485e-a8ec-64a8e3f47d4d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2660, N'delete', 0, N'DELETE FROM COM_PaymentOption WHERE [PaymentOptionID] = @ID', 0, 1144, 0, '20110823 20:50:00', 'c9e0aade-7c9b-40be-a031-52b9b4dcc3fd', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2661, N'insert', 0, N'INSERT INTO COM_PaymentOption ([PaymentOptionName], [PaymentOptionDisplayName], [PaymentOptionEnabled], [PaymentOptionSiteID], [PaymentOptionPaymentGateUrl], [PaymentOptionAssemblyName], [PaymentOptionClassName], [PaymentOptionSucceededOrderStatusID], [PaymentOptionFailedOrderStatusID], [PaymentOptionGUID], [PaymentOptionLastModified], [PaymentOptionAllowIfNoShipping] ) VALUES ( @PaymentOptionName, @PaymentOptionDisplayName, @PaymentOptionEnabled, @PaymentOptionSiteID, @PaymentOptionPaymentGateUrl, @PaymentOptionAssemblyName, @PaymentOptionClassName, @PaymentOptionSucceededOrderStatusID, @PaymentOptionFailedOrderStatusID, @PaymentOptionGUID, @PaymentOptionLastModified, @PaymentOptionAllowIfNoShipping); SELECT SCOPE_IDENTITY() AS [PaymentOptionID]', 1, 1144, 0, '20110823 20:50:00', '5cc55674-e2cc-48db-9448-638a02635e8a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2662, N'update', 0, N'UPDATE COM_PaymentOption SET [PaymentOptionName] = @PaymentOptionName, [PaymentOptionDisplayName] = @PaymentOptionDisplayName, [PaymentOptionEnabled] = @PaymentOptionEnabled, [PaymentOptionSiteID] = @PaymentOptionSiteID, [PaymentOptionPaymentGateUrl] = @PaymentOptionPaymentGateUrl, [PaymentOptionAssemblyName] = @PaymentOptionAssemblyName, [PaymentOptionClassName] = @PaymentOptionClassName, [PaymentOptionSucceededOrderStatusID] = @PaymentOptionSucceededOrderStatusID, [PaymentOptionFailedOrderStatusID] = @PaymentOptionFailedOrderStatusID, [PaymentOptionGUID] = @PaymentOptionGUID, [PaymentOptionLastModified] = @PaymentOptionLastModified, [PaymentOptionAllowIfNoShipping] = @PaymentOptionAllowIfNoShipping WHERE [PaymentOptionID] = @PaymentOptionID', 0, 1144, 0, '20110823 20:50:00', '3dbccb39-3a79-4d88-b20e-45683e98ec9a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4715, N'delete', 0, N'DELETE FROM COM_OptionCategory WHERE [CategoryID] = @ID', 0, 1596, 0, '20110905 16:29:14', '6e19a92f-47a0-4c14-83de-1f94f01c0b68', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4716, N'insert', 0, N'INSERT INTO COM_OptionCategory ([CategoryDisplayName], [CategoryName], [CategorySelectionType], [CategoryDefaultOptions], [CategoryDescription], [CategoryDefaultRecord], [CategoryEnabled], [CategoryGUID], [CategoryLastModified], [CategoryDisplayPrice], [CategorySiteID], [CategoryTextMaxLength] ) VALUES ( @CategoryDisplayName, @CategoryName, @CategorySelectionType, @CategoryDefaultOptions, @CategoryDescription, @CategoryDefaultRecord, @CategoryEnabled, @CategoryGUID, @CategoryLastModified, @CategoryDisplayPrice, @CategorySiteID, @CategoryTextMaxLength); SELECT SCOPE_IDENTITY() AS [CategoryID]', 1, 1596, 0, '20110905 16:29:14', 'a74a14d1-8033-4fb2-8094-8fc55445f3ef', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (4717, N'update', 0, N'UPDATE COM_OptionCategory SET [CategoryDisplayName] = @CategoryDisplayName, [CategoryName] = @CategoryName, [CategorySelectionType] = @CategorySelectionType, [CategoryDefaultOptions] = @CategoryDefaultOptions, [CategoryDescription] = @CategoryDescription, [CategoryDefaultRecord] = @CategoryDefaultRecord, [CategoryEnabled] = @CategoryEnabled, [CategoryGUID] = @CategoryGUID, [CategoryLastModified] = @CategoryLastModified, [CategoryDisplayPrice] = @CategoryDisplayPrice, [CategorySiteID] = @CategorySiteID, [CategoryTextMaxLength] = @CategoryTextMaxLength WHERE [CategoryID] = @CategoryID', 0, 1596, 0, '20110905 16:29:14', '22e51134-4b28-49ab-a778-42a6e53ffdc7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6461, N'delete', 0, N'DELETE FROM Board_Board WHERE [BoardID] = @ID', 0, 1788, 0, '20110909 14:37:18', '058dea3d-ef19-47d5-808d-c1d13336ebd5', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6462, N'insert', 0, N'INSERT INTO Board_Board ([BoardName], [BoardDisplayName], [BoardDescription], [BoardOpened], [BoardOpenedFrom], [BoardOpenedTo], [BoardEnabled], [BoardAccess], [BoardModerated], [BoardUseCaptcha], [BoardMessages], [BoardLastModified], [BoardGUID], [BoardDocumentID], [BoardUserID], [BoardGroupID], [BoardLastMessageTime], [BoardLastMessageUserName], [BoardUnsubscriptionURL], [BoardRequireEmails], [BoardSiteID], [BoardEnableSubscriptions], [BoardBaseURL], [BoardLogActivity] ) VALUES ( @BoardName, @BoardDisplayName, @BoardDescription, @BoardOpened, @BoardOpenedFrom, @BoardOpenedTo, @BoardEnabled, @BoardAccess, @BoardModerated, @BoardUseCaptcha, @BoardMessages, @BoardLastModified, @BoardGUID, @BoardDocumentID, @BoardUserID, @BoardGroupID, @BoardLastMessageTime, @BoardLastMessageUserName, @BoardUnsubscriptionURL, @BoardRequireEmails, @BoardSiteID, @BoardEnableSubscriptions, @BoardBaseURL, @BoardLogActivity); SELECT SCOPE_IDENTITY() AS [BoardID]', 1, 1788, 0, '20110909 14:37:18', 'f573bee7-aed0-4959-a1a6-a8e644429d7b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (6463, N'update', 0, N'UPDATE Board_Board SET [BoardName] = @BoardName, [BoardDisplayName] = @BoardDisplayName, [BoardDescription] = @BoardDescription, [BoardOpened] = @BoardOpened, [BoardOpenedFrom] = @BoardOpenedFrom, [BoardOpenedTo] = @BoardOpenedTo, [BoardEnabled] = @BoardEnabled, [BoardAccess] = @BoardAccess, [BoardModerated] = @BoardModerated, [BoardUseCaptcha] = @BoardUseCaptcha, [BoardMessages] = @BoardMessages, [BoardLastModified] = @BoardLastModified, [BoardGUID] = @BoardGUID, [BoardDocumentID] = @BoardDocumentID, [BoardUserID] = @BoardUserID, [BoardGroupID] = @BoardGroupID, [BoardLastMessageTime] = @BoardLastMessageTime, [BoardLastMessageUserName] = @BoardLastMessageUserName, [BoardUnsubscriptionURL] = @BoardUnsubscriptionURL, [BoardRequireEmails] = @BoardRequireEmails, [BoardSiteID] = @BoardSiteID, [BoardEnableSubscriptions] = @BoardEnableSubscriptions, [BoardBaseURL] = @BoardBaseURL, [BoardLogActivity] = @BoardLogActivity WHERE [BoardID] = @BoardID', 0, 1788, 0, '20110909 14:37:18', '97cfc933-bcf2-4228-a9db-a47f0adedf5f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7123, N'delete', 0, N'DELETE FROM Media_File WHERE [FileID] = @ID', 0, 1935, 0, '20110913 13:46:30', 'b9863fa4-709a-409e-9f53-3533689f23c7', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7124, N'insert', 0, N'INSERT INTO Media_File ([FileName], [FileTitle], [FileDescription], [FileExtension], [FileMimeType], [FilePath], [FileSize], [FileImageWidth], [FileImageHeight], [FileGUID], [FileLibraryID], [FileSiteID], [FileCreatedByUserID], [FileCreatedWhen], [FileModifiedByUserID], [FileModifiedWhen], [FileCustomData] ) VALUES ( @FileName, @FileTitle, @FileDescription, @FileExtension, @FileMimeType, @FilePath, @FileSize, @FileImageWidth, @FileImageHeight, @FileGUID, @FileLibraryID, @FileSiteID, @FileCreatedByUserID, @FileCreatedWhen, @FileModifiedByUserID, @FileModifiedWhen, @FileCustomData); SELECT SCOPE_IDENTITY() AS [FileID]', 1, 1935, 0, '20110913 13:46:30', '283bec46-37fb-4a87-bdea-a386f6b96f3a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7125, N'update', 0, N'UPDATE Media_File SET [FileName] = @FileName, [FileTitle] = @FileTitle, [FileDescription] = @FileDescription, [FileExtension] = @FileExtension, [FileMimeType] = @FileMimeType, [FilePath] = @FilePath, [FileSize] = @FileSize, [FileImageWidth] = @FileImageWidth, [FileImageHeight] = @FileImageHeight, [FileGUID] = @FileGUID, [FileLibraryID] = @FileLibraryID, [FileSiteID] = @FileSiteID, [FileCreatedByUserID] = @FileCreatedByUserID, [FileCreatedWhen] = @FileCreatedWhen, [FileModifiedByUserID] = @FileModifiedByUserID, [FileModifiedWhen] = @FileModifiedWhen, [FileCustomData] = @FileCustomData WHERE [FileID] = @FileID', 0, 1935, 0, '20110913 13:46:30', 'a4fac941-17c1-4df2-b11d-118fba52847b', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2472, N'delete', 0, N'DELETE FROM Forums_Forum WHERE [ForumID] = @ID', 0, 1122, 0, '20110915 14:36:15', '48277928-6645-4a82-908e-afce69eb014f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2473, N'insert', 0, N'INSERT INTO Forums_Forum ([ForumGroupID], [ForumName], [ForumDisplayName], [ForumDescription], [ForumOrder], [ForumDocumentID], [ForumOpen], [ForumModerated], [ForumDisplayEmails], [ForumRequireEmail], [ForumAccess], [ForumThreads], [ForumPosts], [ForumLastPostTime], [ForumLastPostUserName], [ForumBaseUrl], [ForumAllowChangeName], [ForumHTMLEditor], [ForumUseCAPTCHA], [ForumGUID], [ForumLastModified], [ForumUnsubscriptionUrl], [ForumIsLocked], [ForumSettings], [ForumAuthorEdit], [ForumAuthorDelete], [ForumType], [ForumIsAnswerLimit], [ForumImageMaxSideSize], [ForumLastPostTimeAbsolute], [ForumLastPostUserNameAbsolute], [ForumPostsAbsolute], [ForumThreadsAbsolute], [ForumAttachmentMaxFileSize], [ForumDiscussionActions], [ForumSiteID], [ForumLogActivity], [ForumCommunityGroupID] ) VALUES ( @ForumGroupID, @ForumName, @ForumDisplayName, @ForumDescription, @ForumOrder, @ForumDocumentID, @ForumOpen, @ForumModerated, @ForumDisplayEmails, @ForumRequireEmail, @ForumAccess, @ForumThreads, @ForumPosts, @ForumLastPostTime, @ForumLastPostUserName, @ForumBaseUrl, @ForumAllowChangeName, @ForumHTMLEditor, @ForumUseCAPTCHA, @ForumGUID, @ForumLastModified, @ForumUnsubscriptionUrl, @ForumIsLocked, @ForumSettings, @ForumAuthorEdit, @ForumAuthorDelete, @ForumType, @ForumIsAnswerLimit, @ForumImageMaxSideSize, @ForumLastPostTimeAbsolute, @ForumLastPostUserNameAbsolute, @ForumPostsAbsolute, @ForumThreadsAbsolute, @ForumAttachmentMaxFileSize, @ForumDiscussionActions, @ForumSiteID, @ForumLogActivity, @ForumCommunityGroupID); SELECT SCOPE_IDENTITY() AS [ForumID]', 1, 1122, 0, '20110915 14:36:15', 'fb273bef-04a1-419f-9ebe-9a3db8151849', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2474, N'update', 0, N'UPDATE Forums_Forum SET [ForumGroupID] = @ForumGroupID, [ForumName] = @ForumName, [ForumDisplayName] = @ForumDisplayName, [ForumDescription] = @ForumDescription, [ForumOrder] = @ForumOrder, [ForumDocumentID] = @ForumDocumentID, [ForumOpen] = @ForumOpen, [ForumModerated] = @ForumModerated, [ForumDisplayEmails] = @ForumDisplayEmails, [ForumRequireEmail] = @ForumRequireEmail, [ForumAccess] = @ForumAccess, [ForumThreads] = @ForumThreads, [ForumPosts] = @ForumPosts, [ForumLastPostTime] = @ForumLastPostTime, [ForumLastPostUserName] = @ForumLastPostUserName, [ForumBaseUrl] = @ForumBaseUrl, [ForumAllowChangeName] = @ForumAllowChangeName, [ForumHTMLEditor] = @ForumHTMLEditor, [ForumUseCAPTCHA] = @ForumUseCAPTCHA, [ForumGUID] = @ForumGUID, [ForumLastModified] = @ForumLastModified, [ForumUnsubscriptionUrl] = @ForumUnsubscriptionUrl, [ForumIsLocked] = @ForumIsLocked, [ForumSettings] = @ForumSettings, [ForumAuthorEdit] = @ForumAuthorEdit, [ForumAuthorDelete] = @ForumAuthorDelete, [ForumType] = @ForumType, [ForumIsAnswerLimit] = @ForumIsAnswerLimit, [ForumImageMaxSideSize] = @ForumImageMaxSideSize, [ForumLastPostTimeAbsolute] = @ForumLastPostTimeAbsolute, [ForumLastPostUserNameAbsolute] = @ForumLastPostUserNameAbsolute, [ForumPostsAbsolute] = @ForumPostsAbsolute, [ForumThreadsAbsolute] = @ForumThreadsAbsolute, [ForumAttachmentMaxFileSize] = @ForumAttachmentMaxFileSize, [ForumDiscussionActions] = @ForumDiscussionActions, [ForumSiteID] = @ForumSiteID, [ForumLogActivity] = @ForumLogActivity, [ForumCommunityGroupID] = @ForumCommunityGroupID WHERE [ForumID] = @ForumID', 0, 1122, 0, '20110915 14:36:15', '1febc157-2aa6-462c-8d61-ebf25aa7766d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (221, N'delete', 0, N'DELETE FROM CMS_Document WHERE [DocumentID] = @ID', 0, 144, 0, '20110917 15:16:49', '70b71787-54d4-4e24-b0c7-90421de24c14', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (222, N'insert', 0, N'INSERT INTO CMS_Document ([DocumentName], [DocumentNamePath], [DocumentModifiedWhen], [DocumentModifiedByUserID], [DocumentForeignKeyValue], [DocumentCreatedByUserID], [DocumentCreatedWhen], [DocumentCheckedOutByUserID], [DocumentCheckedOutWhen], [DocumentCheckedOutVersionHistoryID], [DocumentPublishedVersionHistoryID], [DocumentWorkflowStepID], [DocumentPublishFrom], [DocumentPublishTo], [DocumentUrlPath], [DocumentCulture], [DocumentNodeID], [DocumentPageTitle], [DocumentPageKeyWords], [DocumentPageDescription], [DocumentShowInSiteMap], [DocumentMenuItemHideInNavigation], [DocumentMenuCaption], [DocumentMenuStyle], [DocumentMenuItemImage], [DocumentMenuItemLeftImage], [DocumentMenuItemRightImage], [DocumentPageTemplateID], [DocumentMenuJavascript], [DocumentMenuRedirectUrl], [DocumentUseNamePathForUrlPath], [DocumentStylesheetID], [DocumentContent], [DocumentMenuClass], [DocumentMenuStyleOver], [DocumentMenuClassOver], [DocumentMenuItemImageOver], [DocumentMenuItemLeftImageOver], [DocumentMenuItemRightImageOver], [DocumentMenuStyleHighlighted], [DocumentMenuClassHighlighted], [DocumentMenuItemImageHighlighted], [DocumentMenuItemLeftImageHighlighted], [DocumentMenuItemRightImageHighlighted], [DocumentMenuItemInactive], [DocumentCustomData], [DocumentExtensions], [DocumentCampaign], [DocumentTags], [DocumentTagGroupID], [DocumentWildcardRule], [DocumentWebParts], [DocumentRatingValue], [DocumentRatings], [DocumentPriority], [DocumentType], [DocumentLastPublished], [DocumentUseCustomExtensions], [DocumentGroupWebParts], [DocumentCheckedOutAutomatically], [DocumentTrackConversionName], [DocumentConversionValue], [DocumentSearchExcluded], [DocumentLastVersionName], [DocumentLastVersionNumber], [DocumentIsArchived], [DocumentLastVersionType], [DocumentLastVersionMenuRedirectUrl], [DocumentHash], [DocumentLogVisitActivity], [DocumentGUID], [DocumentWorkflowCycleGUID] ) VALUES ( @DocumentName, @DocumentNamePath, @DocumentModifiedWhen, @DocumentModifiedByUserID, @DocumentForeignKeyValue, @DocumentCreatedByUserID, @DocumentCreatedWhen, @DocumentCheckedOutByUserID, @DocumentCheckedOutWhen, @DocumentCheckedOutVersionHistoryID, @DocumentPublishedVersionHistoryID, @DocumentWorkflowStepID, @DocumentPublishFrom, @DocumentPublishTo, @DocumentUrlPath, @DocumentCulture, @DocumentNodeID, @DocumentPageTitle, @DocumentPageKeyWords, @DocumentPageDescription, @DocumentShowInSiteMap, @DocumentMenuItemHideInNavigation, @DocumentMenuCaption, @DocumentMenuStyle, @DocumentMenuItemImage, @DocumentMenuItemLeftImage, @DocumentMenuItemRightImage, @DocumentPageTemplateID, @DocumentMenuJavascript, @DocumentMenuRedirectUrl, @DocumentUseNamePathForUrlPath, @DocumentStylesheetID, @DocumentContent, @DocumentMenuClass, @DocumentMenuStyleOver, @DocumentMenuClassOver, @DocumentMenuItemImageOver, @DocumentMenuItemLeftImageOver, @DocumentMenuItemRightImageOver, @DocumentMenuStyleHighlighted, @DocumentMenuClassHighlighted, @DocumentMenuItemImageHighlighted, @DocumentMenuItemLeftImageHighlighted, @DocumentMenuItemRightImageHighlighted, @DocumentMenuItemInactive, @DocumentCustomData, @DocumentExtensions, @DocumentCampaign, @DocumentTags, @DocumentTagGroupID, @DocumentWildcardRule, @DocumentWebParts, @DocumentRatingValue, @DocumentRatings, @DocumentPriority, @DocumentType, @DocumentLastPublished, @DocumentUseCustomExtensions, @DocumentGroupWebParts, @DocumentCheckedOutAutomatically, @DocumentTrackConversionName, @DocumentConversionValue, @DocumentSearchExcluded, @DocumentLastVersionName, @DocumentLastVersionNumber, @DocumentIsArchived, @DocumentLastVersionType, @DocumentLastVersionMenuRedirectUrl, @DocumentHash, @DocumentLogVisitActivity, @DocumentGUID, @DocumentWorkflowCycleGUID); SELECT SCOPE_IDENTITY() AS [DocumentID]', 1, 144, 0, '20110917 15:16:49', '2330a05b-6fe7-402b-8ab4-33966bc9fc9d', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (223, N'update', 0, N'UPDATE CMS_Document SET [DocumentName] = @DocumentName, [DocumentNamePath] = @DocumentNamePath, [DocumentModifiedWhen] = @DocumentModifiedWhen, [DocumentModifiedByUserID] = @DocumentModifiedByUserID, [DocumentForeignKeyValue] = @DocumentForeignKeyValue, [DocumentCreatedByUserID] = @DocumentCreatedByUserID, [DocumentCreatedWhen] = @DocumentCreatedWhen, [DocumentCheckedOutByUserID] = @DocumentCheckedOutByUserID, [DocumentCheckedOutWhen] = @DocumentCheckedOutWhen, [DocumentCheckedOutVersionHistoryID] = @DocumentCheckedOutVersionHistoryID, [DocumentPublishedVersionHistoryID] = @DocumentPublishedVersionHistoryID, [DocumentWorkflowStepID] = @DocumentWorkflowStepID, [DocumentPublishFrom] = @DocumentPublishFrom, [DocumentPublishTo] = @DocumentPublishTo, [DocumentUrlPath] = @DocumentUrlPath, [DocumentCulture] = @DocumentCulture, [DocumentNodeID] = @DocumentNodeID, [DocumentPageTitle] = @DocumentPageTitle, [DocumentPageKeyWords] = @DocumentPageKeyWords, [DocumentPageDescription] = @DocumentPageDescription, [DocumentShowInSiteMap] = @DocumentShowInSiteMap, [DocumentMenuItemHideInNavigation] = @DocumentMenuItemHideInNavigation, [DocumentMenuCaption] = @DocumentMenuCaption, [DocumentMenuStyle] = @DocumentMenuStyle, [DocumentMenuItemImage] = @DocumentMenuItemImage, [DocumentMenuItemLeftImage] = @DocumentMenuItemLeftImage, [DocumentMenuItemRightImage] = @DocumentMenuItemRightImage, [DocumentPageTemplateID] = @DocumentPageTemplateID, [DocumentMenuJavascript] = @DocumentMenuJavascript, [DocumentMenuRedirectUrl] = @DocumentMenuRedirectUrl, [DocumentUseNamePathForUrlPath] = @DocumentUseNamePathForUrlPath, [DocumentStylesheetID] = @DocumentStylesheetID, [DocumentContent] = @DocumentContent, [DocumentMenuClass] = @DocumentMenuClass, [DocumentMenuStyleOver] = @DocumentMenuStyleOver, [DocumentMenuClassOver] = @DocumentMenuClassOver, [DocumentMenuItemImageOver] = @DocumentMenuItemImageOver, [DocumentMenuItemLeftImageOver] = @DocumentMenuItemLeftImageOver, [DocumentMenuItemRightImageOver] = @DocumentMenuItemRightImageOver, [DocumentMenuStyleHighlighted] = @DocumentMenuStyleHighlighted, [DocumentMenuClassHighlighted] = @DocumentMenuClassHighlighted, [DocumentMenuItemImageHighlighted] = @DocumentMenuItemImageHighlighted, [DocumentMenuItemLeftImageHighlighted] = @DocumentMenuItemLeftImageHighlighted, [DocumentMenuItemRightImageHighlighted] = @DocumentMenuItemRightImageHighlighted, [DocumentMenuItemInactive] = @DocumentMenuItemInactive, [DocumentCustomData] = @DocumentCustomData, [DocumentExtensions] = @DocumentExtensions, [DocumentCampaign] = @DocumentCampaign, [DocumentTags] = @DocumentTags, [DocumentTagGroupID] = @DocumentTagGroupID, [DocumentWildcardRule] = @DocumentWildcardRule, [DocumentWebParts] = @DocumentWebParts, [DocumentRatingValue] = @DocumentRatingValue, [DocumentRatings] = @DocumentRatings, [DocumentPriority] = @DocumentPriority, [DocumentType] = @DocumentType, [DocumentLastPublished] = @DocumentLastPublished, [DocumentUseCustomExtensions] = @DocumentUseCustomExtensions, [DocumentGroupWebParts] = @DocumentGroupWebParts, [DocumentCheckedOutAutomatically] = @DocumentCheckedOutAutomatically, [DocumentTrackConversionName] = @DocumentTrackConversionName, [DocumentConversionValue] = @DocumentConversionValue, [DocumentSearchExcluded] = @DocumentSearchExcluded, [DocumentLastVersionName] = @DocumentLastVersionName, [DocumentLastVersionNumber] = @DocumentLastVersionNumber, [DocumentIsArchived] = @DocumentIsArchived, [DocumentLastVersionType] = @DocumentLastVersionType, [DocumentLastVersionMenuRedirectUrl] = @DocumentLastVersionMenuRedirectUrl, [DocumentHash] = @DocumentHash, [DocumentLogVisitActivity] = @DocumentLogVisitActivity, [DocumentGUID] = @DocumentGUID, [DocumentWorkflowCycleGUID] = @DocumentWorkflowCycleGUID WHERE [DocumentID] = @DocumentID', 0, 144, 0, '20110917 15:16:49', 'c55c1443-20e0-424f-929f-d3cc1ebf0f6a', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (13724, N'CheckDependencies', 0, N'SELECT TOP 1 SKUID FROM COM_SKU WHERE SKUMembershipGUID = (SELECT TOP 1 MembershipGUID FROM CMS_Membership WHERE MembershipID = @ID)', 0, 2785, 0, '20110922 10:38:52', 'a7359b97-51ce-49b3-a9fd-ceeb4c1e3322', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (857, N'delete', 0, N'DELETE FROM CMS_AttachmentHistory WHERE [AttachmentHistoryID] = @ID', 0, 516, 0, '20111006 02:12:00', 'b74d2188-1ee4-4e99-9e90-ac6ea957a1de', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (858, N'insert', 0, N'INSERT INTO CMS_AttachmentHistory ([AttachmentName], [AttachmentExtension], [AttachmentSize], [AttachmentMimeType], [AttachmentBinary], [AttachmentImageWidth], [AttachmentImageHeight], [AttachmentDocumentID], [AttachmentGUID], [AttachmentIsUnsorted], [AttachmentOrder], [AttachmentGroupGUID], [AttachmentHash], [AttachmentTitle], [AttachmentDescription], [AttachmentCustomData], [AttachmentLastModified] ) VALUES ( @AttachmentName, @AttachmentExtension, @AttachmentSize, @AttachmentMimeType, @AttachmentBinary, @AttachmentImageWidth, @AttachmentImageHeight, @AttachmentDocumentID, @AttachmentGUID, @AttachmentIsUnsorted, @AttachmentOrder, @AttachmentGroupGUID, @AttachmentHash, @AttachmentTitle, @AttachmentDescription, @AttachmentCustomData, @AttachmentLastModified); SELECT SCOPE_IDENTITY() AS [AttachmentHistoryID]', 1, 516, 0, '20111006 02:12:00', '6b46c42f-8393-46d8-9d14-f3c5caeba077', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (859, N'update', 0, N'UPDATE CMS_AttachmentHistory SET [AttachmentName] = @AttachmentName, [AttachmentExtension] = @AttachmentExtension, [AttachmentSize] = @AttachmentSize, [AttachmentMimeType] = @AttachmentMimeType, [AttachmentBinary] = @AttachmentBinary, [AttachmentImageWidth] = @AttachmentImageWidth, [AttachmentImageHeight] = @AttachmentImageHeight, [AttachmentDocumentID] = @AttachmentDocumentID, [AttachmentGUID] = @AttachmentGUID, [AttachmentIsUnsorted] = @AttachmentIsUnsorted, [AttachmentOrder] = @AttachmentOrder, [AttachmentGroupGUID] = @AttachmentGroupGUID, [AttachmentHash] = @AttachmentHash, [AttachmentTitle] = @AttachmentTitle, [AttachmentDescription] = @AttachmentDescription, [AttachmentCustomData] = @AttachmentCustomData, [AttachmentLastModified] = @AttachmentLastModified WHERE [AttachmentHistoryID] = @AttachmentHistoryID', 0, 516, 0, '20111006 02:12:00', '6f4cd838-3df4-4a84-a6c1-bd3c44716f80', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (814, N'delete', 0, N'DELETE FROM CMS_Attachment WHERE [AttachmentID] = @ID', 0, 504, 0, '20111006 02:13:44', '292a3e25-3c25-4d87-8ec7-2aa9b28638fc', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (815, N'insert', 0, N'INSERT INTO CMS_Attachment ([AttachmentName], [AttachmentExtension], [AttachmentSize], [AttachmentMimeType], [AttachmentBinary], [AttachmentImageWidth], [AttachmentImageHeight], [AttachmentDocumentID], [AttachmentGUID], [AttachmentLastHistoryID], [AttachmentSiteID], [AttachmentLastModified], [AttachmentIsUnsorted], [AttachmentOrder], [AttachmentGroupGUID], [AttachmentFormGUID], [AttachmentHash], [AttachmentTitle], [AttachmentDescription], [AttachmentCustomData] ) VALUES ( @AttachmentName, @AttachmentExtension, @AttachmentSize, @AttachmentMimeType, @AttachmentBinary, @AttachmentImageWidth, @AttachmentImageHeight, @AttachmentDocumentID, @AttachmentGUID, @AttachmentLastHistoryID, @AttachmentSiteID, @AttachmentLastModified, @AttachmentIsUnsorted, @AttachmentOrder, @AttachmentGroupGUID, @AttachmentFormGUID, @AttachmentHash, @AttachmentTitle, @AttachmentDescription, @AttachmentCustomData); SELECT SCOPE_IDENTITY() AS [AttachmentID]', 1, 504, 0, '20111006 02:13:44', 'b7bc930f-772a-46a7-bcd3-efbb9c2c9c36', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (816, N'update', 0, N'UPDATE CMS_Attachment SET [AttachmentName] = @AttachmentName, [AttachmentExtension] = @AttachmentExtension, [AttachmentSize] = @AttachmentSize, [AttachmentMimeType] = @AttachmentMimeType, [AttachmentBinary] = @AttachmentBinary, [AttachmentImageWidth] = @AttachmentImageWidth, [AttachmentImageHeight] = @AttachmentImageHeight, [AttachmentDocumentID] = @AttachmentDocumentID, [AttachmentGUID] = @AttachmentGUID, [AttachmentLastHistoryID] = @AttachmentLastHistoryID, [AttachmentSiteID] = @AttachmentSiteID, [AttachmentLastModified] = @AttachmentLastModified, [AttachmentIsUnsorted] = @AttachmentIsUnsorted, [AttachmentOrder] = @AttachmentOrder, [AttachmentGroupGUID] = @AttachmentGroupGUID, [AttachmentFormGUID] = @AttachmentFormGUID, [AttachmentHash] = @AttachmentHash, [AttachmentTitle] = @AttachmentTitle, [AttachmentDescription] = @AttachmentDescription, [AttachmentCustomData] = @AttachmentCustomData WHERE [AttachmentID] = @AttachmentID', 0, 504, 0, '20111006 02:13:44', '2975efc5-39de-4413-bc38-1ccf2358d22e', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (3929, N'getversionwithoutbinary', 0, N'SELECT AttachmentHistoryID, AttachmentName, AttachmentExtension, AttachmentSize, AttachmentMimeType, AttachmentImageWidth, AttachmentImageHeight, AttachmentDocumentID, AttachmentGUID, AttachmentIsUnsorted, AttachmentOrder, AttachmentGroupGUID, AttachmentIsUnsorted, AttachmentOrder, AttachmentGroupGUID, AttachmentTitle, AttachmentDescription, AttachmentCustomData, AttachmentHash FROM CMS_AttachmentHistory WHERE AttachmentGUID = @AttachmentGUID AND AttachmentHistoryID IN (SELECT AttachmentHistoryID FROM CMS_VersionAttachment WHERE VersionHistoryID = @VersionHistoryID)', 0, 516, 0, '20111006 02:18:09', 'ed27a6c0-2de4-40c8-9667-ee006d60566f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (7239, N'getversionbynamewithoutbinary', 0, N'SELECT AttachmentHistoryID, AttachmentName, AttachmentExtension, AttachmentSize, AttachmentMimeType, AttachmentImageWidth, AttachmentImageHeight, AttachmentDocumentID, AttachmentGUID, AttachmentIsUnsorted, AttachmentOrder, AttachmentGroupGUID, AttachmentTitle, AttachmentDescription, AttachmentCustomData, AttachmentHash FROM CMS_AttachmentHistory WHERE AttachmentName = @AttachmentName AND AttachmentHistoryID IN (SELECT AttachmentHistoryID FROM CMS_VersionAttachment WHERE VersionHistoryID = @VersionHistoryID)', 0, 516, 0, '20111006 06:41:29', '1ba4e461-95af-4d65-8d06-60022338b468', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (13784, N'selectcontactopens', 0, N'SELECT COUNT(ActivityActiveContactID) FROM (SELECT ActivityActiveContactID
  FROM [OM_Activity]
  WHERE (ActivityType = ''newsletteropen'') AND (ActivityItemDetailID = @IssueID) AND (ActivityValue LIKE ''contactgroup%'')
  GROUP BY ActivityActiveContactID) AS [OpenEmailCount]', 0, 2429, 0, '20111117 10:54:55', 'dfd7e3cd-b061-49d1-bea0-c4b4ccbd9791', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (10328, N'selectallIssueOpeners', 0, N'SELECT ##TOPN## ##COLUMNS## FROM
(SELECT [IssueID]
      ,[SubscriberID]
      ,[SubscriberFullName]
      ,[SubscriberEmail]
      ,[OpenedWhen]
      ,[SiteID]
  FROM [View_Newsletter_IssueOpenedBy]
  WHERE [IssueID]=@IssueID
UNION
SELECT [ActivityItemDetailID] AS [IssueID]
      ,0 AS [SubscriberID]
      ,''Contact ''''''+[ContactFirstName]+'' ''+[ContactLastName]+'''''''' AS [SubscriberFullName]
      ,[ContactEmail] AS [SubscriberEmail]
      ,[ActivityCreated] AS [OpenedWhen]
      ,[ActivitySiteID] AS [SiteID]
  FROM [View_OM_Contact_Activity] AS [Activity1]
  WHERE (ActivityType = ''newsletteropen'' AND ActivityItemDetailID = @IssueID AND ActivityValue LIKE ''contactgroup%''
  AND ActivityCreated = (SELECT MIN(ActivityCreated) FROM [OM_Activity] AS [Activity2] WHERE (ActivityType = ''newsletteropen'' AND ActivityItemDetailID = @IssueID
	AND ActivityValue LIKE ''contactgroup%'' AND [Activity1].ActivityActiveContactID = [Activity2].ActivityActiveContactID)))) AS [OpenedBy]
WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 2429, 0, '20111117 11:27:13', '618bf8ff-7377-41fa-9a00-71e4d91b1e5f', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (11629, N'selectAllLinkClickers', 0, N'SELECT ##TOPN## ##COLUMNS## FROM
(SELECT [LinkID]
      ,[SubscriberID]
      ,[SubscriberFullName]
      ,[SubscriberEmail]
      ,[Clicks]
      ,[SiteID]
  FROM [View_Newsletter_LinkClickedBy]
UNION
SELECT [LinkID]
      ,0 AS [SubscriberID]
      ,''Contact ''''''+[ContactFirstName]+'' ''+[ContactLastName]+'''''''' AS [SubscriberFullName]
      ,[ContactEmail] AS [SubscriberEmail]
      ,[Clicks]
      ,[ActivitySiteID] AS [SiteID]
  FROM 
  (
	SELECT [ContactFirstName],[ContactLastName],[ContactEmail],COUNT([ActivityID]) AS [Clicks],[ActivitySiteID],[ActivityURL],[ActivityItemDetailID]
		FROM [View_OM_Contact_Activity]
		WHERE (ActivityType = ''newsletterclickthrough'') AND (ActivityValue LIKE ''contactgroup%'')
		GROUP BY [ContactFirstName],[ContactLastName],[ContactEmail],[ActivitySiteID],[ActivityURL],[ActivityItemID],[ActivityItemDetailID]
  ) AS [ActionClicks], [Newsletter_Link]
  WHERE (LinkTarget=ActivityURL AND LinkIssueID=ActivityItemDetailID)) AS [ClickedBy]
WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 2697, 0, '20111122 09:04:20', 'bb31f536-ff23-4ccd-b4ed-bbdcdbbf44a6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (11616, N'selectstatistics', 0, N'SELECT ##TOPN## ##COLUMNS## FROM 
(
SELECT Newsletter_Link.LinkID,
       Newsletter_Link.LinkTarget,
       Newsletter_Link.LinkDescription,
       Newsletter_Link.LinkOutdated,
       ISNULL(Clicks, 0) AS UniqueClicks,
       ISNULL(Newsletter_Link.LinkTotalClicks, 0) AS TotalClicks,
       (ISNULL(Clicks, 0) / NULLIF(IssueSentEmails, 0)) * 100 AS ClickRate,
       Newsletter_Link.LinkIssueID AS IssueID,
       Issues.IssueSiteID AS SiteID
  FROM Newsletter_Link
	LEFT OUTER JOIN
	(
	-- Select unique clicks for links
	SELECT LinkID, CAST(SUM(Clicks) AS float) AS Clicks FROM 
	(
	 -- Select subscribers'' clicks
	 SELECT LinkID, COUNT(Clicks) AS Clicks FROM Newsletter_SubscriberLink GROUP BY LinkID
		UNION ALL
	 -- Select contacts'' clicks
	 SELECT LinkID, Clicks FROM
	(SELECT COUNT(ActivityActiveContactID) AS Clicks, ActivityURL AS Link, ActivityItemDetailID AS IssueID FROM (SELECT ActivityActiveContactID, ActivityURL, ActivityItemDetailID
	  FROM [OM_Activity]
	  WHERE (ActivityType = ''newsletterclickthrough'') AND (ActivityValue LIKE ''contactgroup%'')
	  GROUP BY ActivityActiveContactID, ActivityURL, ActivityItemDetailID) AS [ContactClickCount]
	  GROUP BY ActivityURL, ActivityItemDetailID) AS [ContactClicks], [Newsletter_Link]
	  WHERE (LinkTarget = [ContactClicks].Link AND LinkIssueID = [ContactClicks].IssueID)
	) AS [AllClicks]
	GROUP BY LinkID
	) AS Links ON Links.LinkID = Newsletter_Link.LinkID
	LEFT OUTER JOIN
        (SELECT IssueID, IssueSentEmails, IssueSiteID FROM Newsletter_NewsletterIssue) AS Issues ON Issues.IssueID = Newsletter_Link.LinkIssueID
) AS [ClickStatistic]
WHERE ##WHERE## ORDER BY ##ORDERBY##', 0, 2694, 0, '20111129 14:18:53', 'f62f6139-428f-4e4b-81bb-774f65fa34f6', 2, NULL)
INSERT INTO [CMS_Query] ([QueryID], [QueryName], [QueryTypeID], [QueryText], [QueryRequiresTransaction], [ClassID], [QueryIsLocked], [QueryLastModified], [QueryGUID], [QueryLoadGeneration], [QueryIsCustom]) VALUES (2973, N'CheckDependencies', 0, N'SELECT TOP 1 OrderCustomerID FROM [COM_Order] WHERE OrderCustomerID=@ID', 0, 1157, 1, '20120208 09:50:33', '15e9b254-adb2-4eba-bd23-560687102257', 2, 1)
SET IDENTITY_INSERT [CMS_Query] OFF
